{
  "openapi": "3.1.0",
  "info": {
    "title": "SMB API",
    "version": "0.2.0-api.20",
    "description": "Use SMB to read permitted Business information, run valuations, and work with shared Workspace resources."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "tags": [
    {
      "name": "Valuations",
      "description": "Run and inspect business, asset, and portfolio valuations."
    },
    {
      "name": "Rooms"
    },
    {
      "name": "Files"
    },
    {
      "name": "Goals"
    },
    {
      "name": "Tasks"
    },
    {
      "name": "Workspace Team"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "check_api_health",
        "summary": "Check API Health",
        "description": "Confirm that the API process is responding.",
        "tags": [
          "System"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "service; environment; status; schema_version; schema_hash. Never expose secrets, bindings, account identifiers, or protected configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.check_api_health.response"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Public"
      }
    },
    "/v1/businesses": {
      "get": {
        "operationId": "search_businesses",
        "summary": "Search Businesses",
        "description": "Search published Businesses by name, US state/city, NAICS sector/code, website URL, or status. A name is optional and supplied filters combine with AND. Location filters match the same published primary location, not necessarily headquarters. Missing, private, or unpublished facts do not match. Results are not a complete census of businesses in a place. Keep filters unchanged when following a cursor, including after an empty page with has_more=true. This read-only route never adds a Business to a Workspace. Send either query or name, never both. naics_vintage requires naics_code. Cross-parameter validation uses x-smb-query-schema; OpenAPI 3.1 parameter schemas alone cannot enforce these rules. Invalid combinations return 400 validation_error.",
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Business name text. Do not send both query and name.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "pattern": "^\\s*\\S[\\s\\S]+\\S\\s*$"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Alias for query. Do not send both query and name.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "pattern": "^\\s*\\S[\\s\\S]+\\S\\s*$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "closed",
                "inactive",
                "unknown"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Two-letter US state code or DC, such as IN. Matches the published primary location, not necessarily headquarters. Case-insensitive; territories are not supported.",
            "schema": {
              "type": "string",
              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Dd][Cc]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy])$",
              "description": "Two-letter US state code or DC, such as IN. Matches the published primary location, not necessarily headquarters. Case-insensitive; territories are not supported."
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Exact city name at the published US primary location, ignoring case and surrounding whitespace. Combine with state to disambiguate.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Exact city name at the published US primary location, ignoring case and surrounding whitespace. Combine with state to disambiguate."
            }
          },
          {
            "name": "naics_code",
            "in": "query",
            "required": false,
            "description": "Published primary NAICS code or 2-5 digit prefix. Six digits match exactly. Also accepts the combined sectors 31-33, 44-45, and 48-49. Unknown or unpublished classifications do not match.",
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]{2,6}|31-33|44-45|48-49)$",
              "description": "Published primary NAICS code or 2-5 digit prefix. Six digits match exactly. Also accepts the combined sectors 31-33, 44-45, and 48-49. Unknown or unpublished classifications do not match."
            }
          },
          {
            "name": "naics_vintage",
            "in": "query",
            "required": false,
            "description": "US NAICS edition. Requires naics_code; defaults to 2022 when omitted. Codes are not translated between editions.",
            "schema": {
              "type": "string",
              "enum": [
                "1997",
                "2002",
                "2007",
                "2012",
                "2017",
                "2022"
              ],
              "description": "US NAICS edition. Requires naics_code; defaults to 2022 when omitted. Codes are not translated between editions."
            }
          },
          {
            "name": "website_url",
            "in": "query",
            "required": false,
            "description": "Exact published HTTP(S) website URL after trimming surrounding whitespace. Scheme, path, case, and trailing slash must match; this is not a domain or substring search.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 2048,
              "pattern": "^https?://[^\\s]+$",
              "description": "Exact published HTTP(S) website URL after trimming surrounding whitespace. Scheme, path, case, and trailing slash must match; this is not a domain or substring search."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor returned by the previous page.",
            "schema": {
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Repeat or comma-separate public Business field names.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "id",
                  "name",
                  "publication_status",
                  "status",
                  "closed_on",
                  "description",
                  "founded_on",
                  "primary_classification_id",
                  "primary_location_id",
                  "published_at",
                  "public_email",
                  "public_phone",
                  "website_url",
                  "country_code",
                  "state",
                  "city",
                  "naics_code",
                  "naics_vintage",
                  "naics_title"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data[]; page {cursor, has_more}; projection; schema_version; as_of; provenance when permitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.search_businesses.response"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "409": {
            "description": "revision_conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "422": {
            "description": "evidence_required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Public",
        "x-smb-query-schema": {
          "type": "object",
          "additionalProperties": false,
          "allOf": [
            {
              "if": {
                "required": [
                  "naics_vintage"
                ]
              },
              "then": {
                "required": [
                  "naics_code"
                ]
              }
            },
            {
              "not": {
                "required": [
                  "query",
                  "name"
                ]
              }
            }
          ],
          "properties": {
            "state": {
              "type": "string",
              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Dd][Cc]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy])$",
              "description": "Two-letter US state code or DC, such as IN. Matches the published primary location, not necessarily headquarters. Case-insensitive; territories are not supported."
            },
            "city": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Exact city name at the published US primary location, ignoring case and surrounding whitespace. Combine with state to disambiguate."
            },
            "naics_code": {
              "type": "string",
              "pattern": "^(?:[0-9]{2,6}|31-33|44-45|48-49)$",
              "description": "Published primary NAICS code or 2-5 digit prefix. Six digits match exactly. Also accepts the combined sectors 31-33, 44-45, and 48-49. Unknown or unpublished classifications do not match."
            },
            "naics_vintage": {
              "type": "string",
              "enum": [
                "1997",
                "2002",
                "2007",
                "2012",
                "2017",
                "2022"
              ],
              "description": "US NAICS edition. Requires naics_code; defaults to 2022 when omitted. Codes are not translated between editions."
            },
            "website_url": {
              "type": "string",
              "minLength": 8,
              "maxLength": 2048,
              "pattern": "^https?://[^\\s]+$",
              "description": "Exact published HTTP(S) website URL after trimming surrounding whitespace. Scheme, path, case, and trailing slash must match; this is not a domain or substring search."
            },
            "query": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "pattern": "^\\s*\\S[\\s\\S]+\\S\\s*$",
              "description": "Business name text with at least three characters after surrounding whitespace is removed."
            },
            "status": {
              "type": "string",
              "enum": [
                "active",
                "closed",
                "inactive",
                "unknown"
              ],
              "description": "Optional published Business status."
            },
            "cursor": {
              "type": "string",
              "pattern": "^(?:biz_[0-7][0-9A-HJKMNP-TV-Z]{25}|bsc1_[A-Za-z0-9_-]{78})$",
              "description": "Cursor returned by the previous page. Requires authenticated Workspace discovery authority."
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Up to 20 records for public previews; up to 100 with authenticated Workspace discovery authority. Repeated discovery is rate limited."
            },
            "fields": {
              "type": "array",
              "maxItems": 200,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "id",
                  "name",
                  "publication_status",
                  "status",
                  "country_code",
                  "state",
                  "city",
                  "naics_code",
                  "naics_vintage",
                  "naics_title",
                  "closed_on",
                  "description",
                  "founded_on",
                  "primary_classification_id",
                  "primary_location_id",
                  "published_at",
                  "public_email",
                  "public_phone",
                  "website_url"
                ]
              },
              "description": "Optional public Business fields to return."
            },
            "name": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "pattern": "^\\s*\\S[\\s\\S]+\\S\\s*$",
              "description": "Alias for query. Do not send both query and name."
            }
          }
        }
      },
      "post": {
        "operationId": "add_business",
        "summary": "Add Business",
        "description": "Adds an existing Business to the selected Workspace, or creates a new sourced Business when no match exists, and starts one collaborative version. Requires edit access and returns a receipt.",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "temporarily_closed",
                      "seasonal",
                      "closed",
                      "unknown"
                    ]
                  },
                  "source_type": {
                    "type": "string",
                    "enum": [
                      "government",
                      "owner",
                      "first_party",
                      "provider",
                      "model",
                      "internal_review"
                    ],
                    "default": "first_party",
                    "description": "Who supplied the facts used to create this Business record."
                  },
                  "source_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "source_uri": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000
                  },
                  "observed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "rights_basis": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "additional_observations": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "value": {},
                        "unit": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 80
                        },
                        "currency": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[A-Z]{3}$"
                        },
                        "observed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "effective_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "source": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        }
                      },
                      "required": [
                        "name",
                        "value"
                      ]
                    }
                  }
                },
                "oneOf": [
                  {
                    "required": [
                      "business_id"
                    ],
                    "not": {
                      "required": [
                        "source_type"
                      ]
                    }
                  },
                  {
                    "required": [
                      "name",
                      "source_name",
                      "observed_at",
                      "rights_basis"
                    ],
                    "not": {
                      "required": [
                        "business_id"
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Stable SMB Business ID."
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "temporarily_closed",
                        "seasonal",
                        "closed",
                        "unknown"
                      ]
                    },
                    "fields": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "updated_fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "based_on_business_revision": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "access_level": {
                      "type": "string",
                      "enum": [
                        "view",
                        "edit",
                        "full_access"
                      ]
                    },
                    "created": {
                      "type": "boolean"
                    },
                    "business_created": {
                      "type": "boolean"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "additional_observations": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "observation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "mapping_status": {
                            "type": "string",
                            "enum": [
                              "mapped",
                              "unmapped"
                            ]
                          }
                        },
                        "required": [
                          "observation_id",
                          "name",
                          "mapping_status"
                        ]
                      }
                    }
                  },
                  "required": [
                    "business_id",
                    "workspace_id",
                    "idempotent_replay",
                    "request_id",
                    "receipt"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Stable SMB Business ID."
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "temporarily_closed",
                        "seasonal",
                        "closed",
                        "unknown"
                      ]
                    },
                    "fields": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "updated_fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "based_on_business_revision": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "access_level": {
                      "type": "string",
                      "enum": [
                        "view",
                        "edit",
                        "full_access"
                      ]
                    },
                    "created": {
                      "type": "boolean"
                    },
                    "business_created": {
                      "type": "boolean"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "additional_observations": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "observation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "mapping_status": {
                            "type": "string",
                            "enum": [
                              "mapped",
                              "unmapped"
                            ]
                          }
                        },
                        "required": [
                          "observation_id",
                          "name",
                          "mapping_status"
                        ]
                      }
                    }
                  },
                  "required": [
                    "business_id",
                    "workspace_id",
                    "idempotent_replay",
                    "request_id",
                    "receipt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/businesses/{business_id}": {
      "get": {
        "operationId": "get_business",
        "summary": "Get a Business",
        "description": "Returns the published Business projection anonymously. A signed-in user token or Workspace API key, together with SMB-Workspace-Id, returns that Workspace's authorized Business projection instead.",
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "business_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business.request/properties/path/properties/business_id"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business.request/properties/query/properties/fields"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business.request/properties/query/properties/revision"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "Required when requesting an authenticated Workspace projection.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public Business data for anonymous callers, or the authorized Workspace projection for a valid Workspace API key.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/smb.v0.operations.get_business.response"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "as_of": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "data": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "bestimate_as_of_date": {
                              "type": "string",
                              "format": "date",
                              "readOnly": true
                            },
                            "bestimate_confidence": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1,
                              "readOnly": true
                            },
                            "bestimate_currency": {
                              "type": "string",
                              "readOnly": true
                            },
                            "bestimate_high_value": {
                              "type": "number",
                              "minimum": 0,
                              "readOnly": true
                            },
                            "bestimate_low_value": {
                              "type": "number",
                              "minimum": 0,
                              "readOnly": true
                            },
                            "bestimate_methodology": {
                              "type": "string",
                              "readOnly": true
                            },
                            "bestimate_model_version": {
                              "type": "string",
                              "readOnly": true
                            },
                            "bestimate_value": {
                              "type": "number",
                              "minimum": 0,
                              "readOnly": true
                            },
                            "city": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200,
                              "description": "City of the published primary Business location."
                            },
                            "closed_on": {
                              "type": "string",
                              "format": "date"
                            },
                            "country_code": {
                              "type": "string",
                              "const": "US",
                              "description": "Country of the published primary Business location."
                            },
                            "description": {
                              "type": "string"
                            },
                            "founded_on": {
                              "type": "string",
                              "format": "date"
                            },
                            "id": {
                              "type": "string",
                              "readOnly": true
                            },
                            "naics_code": {
                              "type": "string",
                              "pattern": "^[0-9]{6}$",
                              "description": "Published primary six-digit NAICS classification."
                            },
                            "naics_title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500,
                              "description": "Title of the published primary NAICS classification when rights permit."
                            },
                            "naics_vintage": {
                              "type": "string",
                              "enum": [
                                "1997",
                                "2002",
                                "2007",
                                "2012",
                                "2017",
                                "2022"
                              ],
                              "description": "Edition of the published primary NAICS classification."
                            },
                            "name": {
                              "type": "string"
                            },
                            "primary_classification_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "primary_location_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "public_email": {
                              "type": "string"
                            },
                            "public_phone": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string",
                              "pattern": "^[A-Z]{2}$",
                              "description": "Two-letter state or DC of the published primary Business location."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "active",
                                "inactive",
                                "closed",
                                "unknown"
                              ]
                            },
                            "website_url": {
                              "type": "string"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "based_on_business_revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "status",
                            "revision",
                            "based_on_business_revision",
                            "access_level",
                            "created_at",
                            "updated_at"
                          ]
                        },
                        "projection": {
                          "type": "string",
                          "const": "workspace"
                        },
                        "request_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "schema_hash": {
                          "type": "string",
                          "pattern": "^sha256:[0-9a-f]{64}$"
                        },
                        "schema_version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        }
                      },
                      "required": [
                        "as_of",
                        "data",
                        "projection",
                        "request_id",
                        "schema_hash",
                        "schema_version"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "409": {
            "description": "revision_conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "422": {
            "description": "evidence_required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Public",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          },
          {}
        ]
      },
      "patch": {
        "operationId": "update_business",
        "summary": "Update Business",
        "description": "Updates a Workspace business version, or, with scope=shared and no Workspace, submits sourced updates about an existing public Business. Shared updates require a signed-in user or an HTTP API key with businesses:write, plus source, observed_at and rights_basis. Submit at most 100 updates total across fields and additional_observations. Each submitted field is saved as pending evidence; canonical facts and publication stay unchanged. Retry the same input and idempotency key to recover the original receipt.",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "Required for Workspace edits; must be omitted when scope=shared.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "business_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable SMB Business ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "workspace",
                      "shared"
                    ],
                    "description": "Use shared explicitly to submit sourced updates without a Workspace. Omission preserves Workspace editing."
                  },
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "fields": {
                    "type": "object",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "active",
                          "temporarily_closed",
                          "seasonal",
                          "closed",
                          "unknown"
                        ]
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 10000
                      },
                      "founded_on": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      },
                      "closed_on": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      },
                      "website_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uri",
                        "maxLength": 2000
                      },
                      "public_email": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "email",
                        "maxLength": 320
                      },
                      "public_phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 100
                      },
                      "primary_location_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "primary_classification_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      }
                    }
                  },
                  "additional_observations": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "value": {},
                        "unit": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 80
                        },
                        "currency": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[A-Z]{3}$"
                        },
                        "observed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "effective_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "source": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        }
                      },
                      "required": [
                        "name",
                        "value"
                      ]
                    }
                  },
                  "source": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300,
                        "pattern": "\\S"
                      },
                      "uri": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https://",
                        "maxLength": 2000
                      }
                    },
                    "required": [
                      "name",
                      "uri"
                    ]
                  },
                  "observed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "rights_basis": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "pattern": "\\S"
                  }
                },
                "oneOf": [
                  {
                    "properties": {
                      "scope": {
                        "const": "workspace"
                      }
                    },
                    "required": [
                      "expected_revision"
                    ],
                    "anyOf": [
                      {
                        "required": [
                          "fields"
                        ]
                      },
                      {
                        "required": [
                          "additional_observations"
                        ]
                      }
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "source"
                          ]
                        },
                        {
                          "required": [
                            "observed_at"
                          ]
                        },
                        {
                          "required": [
                            "rights_basis"
                          ]
                        }
                      ]
                    }
                  },
                  {
                    "properties": {
                      "scope": {
                        "const": "shared"
                      },
                      "additional_observations": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 100,
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200,
                              "pattern": "\\S"
                            },
                            "value": {},
                            "unit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 80
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "observed_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "effective_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "source": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300,
                                  "pattern": "\\S"
                                },
                                "uri": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https://",
                                  "maxLength": 2000
                                }
                              },
                              "additionalProperties": true
                            },
                            "evidence": {
                              "type": "array",
                              "items": {}
                            },
                            "note": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 4000
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ]
                        },
                        "description": "Submit up to 100 facts total, including fields. Keep observations concise and split larger submissions into smaller requests."
                      }
                    },
                    "required": [
                      "scope",
                      "source",
                      "observed_at",
                      "rights_basis"
                    ],
                    "allOf": [
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 1
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 99
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 2
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 98
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 3
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 97
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 4
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 96
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 5
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 95
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 6
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 94
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 7
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 93
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 8
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 92
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 9
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 91
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "fields"
                          ],
                          "properties": {
                            "fields": {
                              "minProperties": 10
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "additional_observations": {
                              "maxItems": 90
                            }
                          }
                        }
                      }
                    ],
                    "anyOf": [
                      {
                        "required": [
                          "fields"
                        ]
                      },
                      {
                        "required": [
                          "additional_observations"
                        ]
                      }
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "expected_revision"
                          ]
                        },
                        {
                          "required": [
                            "workspace_id"
                          ]
                        }
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "temporarily_closed",
                            "seasonal",
                            "closed",
                            "unknown"
                          ]
                        },
                        "fields": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "updated_fields": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "based_on_business_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "created": {
                          "type": "boolean"
                        },
                        "business_created": {
                          "type": "boolean"
                        },
                        "idempotent_replay": {
                          "type": "boolean"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "receipt": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "command_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "operation": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "workspace_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "receipt_id",
                            "command_id",
                            "operation",
                            "workspace_id"
                          ]
                        },
                        "additional_observations": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "observation_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "mapping_status": {
                                "type": "string",
                                "enum": [
                                  "mapped",
                                  "unmapped"
                                ]
                              }
                            },
                            "required": [
                              "observation_id",
                              "name",
                              "mapping_status"
                            ]
                          }
                        }
                      },
                      "required": [
                        "business_id",
                        "workspace_id",
                        "idempotent_replay",
                        "request_id",
                        "receipt"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "scope": {
                          "const": "shared"
                        },
                        "workspace_id": {
                          "type": "null"
                        },
                        "status": {
                          "const": "pending"
                        },
                        "canonical_state_changed": {
                          "const": false
                        },
                        "updates": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "observation_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "status": {
                                "const": "pending"
                              }
                            },
                            "required": [
                              "observation_id",
                              "name",
                              "status"
                            ]
                          }
                        },
                        "idempotent_replay": {
                          "type": "boolean"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "receipt": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "command_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "operation": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "workspace_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "receipt_id",
                            "command_id",
                            "operation",
                            "workspace_id"
                          ]
                        }
                      },
                      "required": [
                        "business_id",
                        "scope",
                        "workspace_id",
                        "status",
                        "canonical_state_changed",
                        "updates",
                        "idempotent_replay",
                        "request_id",
                        "receipt"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/businesses/{business_id}/comparables": {
      "get": {
        "operationId": "get_business_comparables",
        "summary": "Get Business Comparables",
        "description": "Returns a deterministic, explained page of published Business peers for one permitted Business without creating or changing records.",
        "tags": [
          "Businesses"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business_comparables.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "business_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business_comparables.request/properties/path/properties/business_id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business_comparables.request/properties/query/properties/cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_business_comparables.request/properties/query/properties/limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "schema_version": {
                      "type": "string",
                      "const": "smb.v0"
                    },
                    "schema_hash": {
                      "type": "string",
                      "pattern": "^sha256:[0-9a-f]{64}$"
                    },
                    "projection": {
                      "type": "string",
                      "const": "workspace"
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Publication timestamp pinned for deterministic pagination."
                    },
                    "subject": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "publication_version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "published_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Publication used as the comparison subject."
                        },
                        "compared_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp at which the publication-consistent comparison was computed."
                        }
                      },
                      "required": [
                        "business_id",
                        "compared_at",
                        "publication_version",
                        "published_at"
                      ]
                    },
                    "method": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "const": "business-comparables.v1"
                        },
                        "ranking": {
                          "type": "string",
                          "const": "deterministic"
                        },
                        "weights": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "industry": {
                              "type": "integer",
                              "const": 60
                            },
                            "geography": {
                              "type": "integer",
                              "const": 25
                            },
                            "bestimate": {
                              "type": "integer",
                              "const": 15
                            }
                          },
                          "required": [
                            "bestimate",
                            "geography",
                            "industry"
                          ]
                        },
                        "bestimate_freshness_months": {
                          "type": "integer",
                          "const": 24
                        }
                      },
                      "required": [
                        "bestimate_freshness_months",
                        "id",
                        "ranking",
                        "weights"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "maxItems": 25,
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "business": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable SMB Business ID."
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "status": {
                                "type": "string",
                                "const": "active"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "status"
                            ]
                          },
                          "classification": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "system": {
                                "type": "string",
                                "const": "naics"
                              },
                              "code": {
                                "type": "string",
                                "pattern": "^[0-9]{6}$"
                              },
                              "vintage": {
                                "type": "string",
                                "const": "2022"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "code",
                              "system",
                              "vintage"
                            ]
                          },
                          "location": {
                            "type": "object",
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "locality": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "region": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "country_code": {
                                "type": "string",
                                "pattern": "^[A-Z]{2}$"
                              }
                            }
                          },
                          "bestimate": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "value": {
                                "type": "number",
                                "exclusiveMinimum": 0
                              },
                              "low_value": {
                                "type": "number",
                                "minimum": 0
                              },
                              "high_value": {
                                "type": "number",
                                "minimum": 0
                              },
                              "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                              },
                              "as_of_date": {
                                "type": "string",
                                "format": "date"
                              },
                              "confidence": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "methodology": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "model_version": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "as_of_date",
                              "currency",
                              "value"
                            ]
                          },
                          "comparison": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "score": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "signal_coverage": {
                                "type": "integer",
                                "minimum": 60,
                                "maximum": 100
                              },
                              "industry": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "match_level": {
                                    "type": "string",
                                    "enum": [
                                      "naics_sector",
                                      "naics_2",
                                      "naics_3",
                                      "naics_4",
                                      "naics_6"
                                    ]
                                  },
                                  "score": {
                                    "type": "integer",
                                    "enum": [
                                      20,
                                      35,
                                      45,
                                      60
                                    ]
                                  }
                                },
                                "required": [
                                  "match_level",
                                  "score"
                                ]
                              },
                              "geography": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "applied": {
                                    "type": "boolean"
                                  },
                                  "match_level": {
                                    "type": "string",
                                    "enum": [
                                      "same_locality",
                                      "same_region",
                                      "different_region",
                                      "unavailable"
                                    ]
                                  },
                                  "score": {
                                    "type": "integer",
                                    "enum": [
                                      0,
                                      10,
                                      25
                                    ]
                                  }
                                },
                                "required": [
                                  "applied",
                                  "match_level",
                                  "score"
                                ]
                              },
                              "bestimate": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "applied": {
                                    "type": "boolean"
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 15
                                  },
                                  "value_ratio": {
                                    "type": "number",
                                    "exclusiveMinimum": 0
                                  }
                                },
                                "required": [
                                  "applied",
                                  "score"
                                ]
                              },
                              "reasons": {
                                "type": "array",
                                "uniqueItems": true,
                                "minItems": 2,
                                "maxItems": 4,
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "same_naics_sector",
                                    "same_naics_2",
                                    "same_naics_3",
                                    "same_naics_4",
                                    "same_naics_6",
                                    "same_locality",
                                    "same_region",
                                    "different_region",
                                    "location_unavailable",
                                    "bestimate_proximity_applied",
                                    "bestimate_unavailable",
                                    "bestimate_currency_mismatch",
                                    "bestimate_stale"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "bestimate",
                              "geography",
                              "industry",
                              "reasons",
                              "score",
                              "signal_coverage"
                            ]
                          }
                        },
                        "required": [
                          "business",
                          "classification",
                          "comparison"
                        ]
                      }
                    },
                    "page": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "has_more": {
                          "type": "boolean"
                        },
                        "next_cursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        }
                      },
                      "required": [
                        "has_more"
                      ]
                    }
                  },
                  "required": [
                    "as_of",
                    "data",
                    "method",
                    "page",
                    "projection",
                    "request_id",
                    "schema_hash",
                    "schema_version",
                    "subject"
                  ],
                  "x-smb-comparable-method": "Industry 60, public geography 25, and optional current public Bestimate proximity 15. Missing optional signals never make a peer ineligible.",
                  "x-smb-public-redaction": "Candidate rows include only rights-cleared public projections; workspace overlays, contact data, source URLs, and private valuation detail are excluded.",
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/get_business_comparables/response",
                  "title": "Get Business Comparables Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/businesses/{business_id}/valuations": {
      "get": {
        "operationId": "get_valuations",
        "summary": "List Business Valuations",
        "description": "Lists bounded summaries of completed valuations attached to one accessible Business in stable oldest-first availability order. Fetch a valuation by ID for its full persisted input, result, lineage, and refinement answers.",
        "tags": [
          "Valuations"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_valuations.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "business_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_valuations.request/properties/path/properties/business_id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_valuations.request/properties/query/properties/cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_valuations.request/properties/query/properties/limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "valuation_id": {
                            "type": "string",
                            "pattern": "^val_[0-9a-f]{32}$",
                            "description": "Stable valuation ID."
                          },
                          "intake_id": {
                            "type": "string",
                            "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable valuation intake ID."
                          },
                          "business_id": {
                            "type": "string",
                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable SMB Business ID."
                          },
                          "status": {
                            "type": "string",
                            "const": "completed"
                          },
                          "model": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "release": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "benchmark_snapshot_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "release",
                              "benchmark_snapshot_id"
                            ]
                          },
                          "lineage": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "predecessor_valuation_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^val_[0-9a-f]{32}$"
                              },
                              "successor_count": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "predecessor_valuation_id",
                              "successor_count"
                            ]
                          },
                          "refinement_answer_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "timestamps": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "intake_created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "started_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "completed_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "available_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "intake_created_at",
                              "started_at",
                              "completed_at",
                              "available_at"
                            ]
                          }
                        },
                        "required": [
                          "valuation_id",
                          "intake_id",
                          "business_id",
                          "status",
                          "model",
                          "lineage",
                          "refinement_answer_count",
                          "timestamps"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "get_api_capabilities",
        "summary": "Get API Capabilities",
        "description": "Check the hosted API's declared runtime and authentication capability state.",
        "tags": [
          "System"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "Workspace whose capabilities should be returned. Omit for shared business update capabilities.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data or data[]; projection; schema_version; revision when applicable; provenance when permitted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "operation_id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "http": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "method": {
                                "type": "string",
                                "minLength": 1
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "method",
                              "path"
                            ]
                          },
                          "mcp_tool": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "required_scope": {
                            "type": "string",
                            "minLength": 1
                          },
                          "required_scopes": {
                            "type": "array",
                            "minItems": 1,
                            "uniqueItems": true,
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "minimum_access": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "operation_id",
                          "title",
                          "http",
                          "mcp_tool",
                          "required_scope",
                          "required_scopes",
                          "minimum_access"
                        ]
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "workspace_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "workspace_id"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists": {
      "post": {
        "operationId": "create_list",
        "summary": "Create a List",
        "description": "Save a reviewed Business or Person List definition. A null rule creates an empty curated List. Saving never copies members or grants access.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_list.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_list.request/properties/headers/properties/workspace_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "definition": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "business"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "person"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "lifecycle_status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "columns": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema20"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "name",
                        "description",
                        "definition",
                        "version",
                        "lifecycle_status",
                        "count",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "list.create"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_list/response",
                  "title": "Create a List Response"
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "definition": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "business"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema0"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema2"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema3"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema4"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema6"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema8"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema10"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema10"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "person"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema14"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema15"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema16"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema16"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "lifecycle_status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "columns": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema20"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "name",
                        "description",
                        "definition",
                        "version",
                        "lifecycle_status",
                        "count",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "list.create"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_list/response",
                  "title": "Create a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "definition": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "string",
                            "const": "smb.list.v1"
                          },
                          "subject_type": {
                            "type": "string",
                            "const": "business"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "status"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "status"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "website_url"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "website_url"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "city"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200,
                                            "pattern": "[^ ]"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "city"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200,
                                              "pattern": "[^ ]"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "state"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "state"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "naics_code"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "naics_code"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "group"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "all",
                                          "any"
                                        ]
                                      },
                                      "rules": {
                                        "minItems": 1,
                                        "maxItems": 20,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "status"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "status"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "website_url"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "website_url"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "city"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200,
                                                      "pattern": "[^ ]"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "city"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200,
                                                        "pattern": "[^ ]"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "state"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "state"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "naics_code"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "naics_code"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "status"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "status"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "website_url"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "website_url"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "city"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "city"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "minLength": 1,
                                                                  "maxLength": 200,
                                                                  "pattern": "[^ ]"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "state"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "state"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "naics_code"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "naics_code"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "group"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "all",
                                                              "any"
                                                            ]
                                                          },
                                                          "rules": {
                                                            "minItems": 1,
                                                            "maxItems": 20,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "status"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "status"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "website_url"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "website_url"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "city"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "city"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 200,
                                                                            "pattern": "[^ ]"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "state"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "state"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "naics_code"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "naics_code"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "all",
                                                                        "any"
                                                                      ]
                                                                    },
                                                                    "rules": {
                                                                      "minItems": 1,
                                                                      "maxItems": 20,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "anyOf": [
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "status"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "status"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "website_url"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "website_url"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "city"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "city"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "minLength": 1,
                                                                                      "maxLength": 200,
                                                                                      "pattern": "[^ ]"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "state"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "state"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "naics_code"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "naics_code"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "operator",
                                                                    "rules"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "not"
                                                                    },
                                                                    "rule": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "rule"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "operator",
                                                          "rules"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "not"
                                                          },
                                                          "rule": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "rule"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "operator",
                                      "rules"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "not"
                                      },
                                      "rule": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "status"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "status"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "website_url"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "website_url"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "city"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200,
                                                    "pattern": "[^ ]"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "city"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200,
                                                      "pattern": "[^ ]"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "state"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "state"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "naics_code"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "naics_code"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "group"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "all",
                                                  "any"
                                                ]
                                              },
                                              "rules": {
                                                "minItems": 1,
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "operator",
                                              "rules"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "not"
                                              },
                                              "rule": {
                                                "anyOf": [
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "status"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "status"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "website_url"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "website_url"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "city"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 200,
                                                            "pattern": "[^ ]"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "city"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "state"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "state"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "naics_code"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "naics_code"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "group"
                                                      },
                                                      "operator": {
                                                        "type": "string",
                                                        "enum": [
                                                          "all",
                                                          "any"
                                                        ]
                                                      },
                                                      "rules": {
                                                        "minItems": 1,
                                                        "maxItems": 20,
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "operator",
                                                      "rules"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "not"
                                                      },
                                                      "rule": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "status"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "status"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "website_url"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "website_url"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "city"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "minLength": 1,
                                                                    "maxLength": 200,
                                                                    "pattern": "[^ ]"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "city"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "state"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "state"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "naics_code"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "naics_code"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "group"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "all",
                                                                  "any"
                                                                ]
                                                              },
                                                              "rules": {
                                                                "minItems": 1,
                                                                "maxItems": 20,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "operator",
                                                              "rules"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "not"
                                                              },
                                                              "rule": {
                                                                "anyOf": [
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "status"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "status"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "website_url"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "website_url"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "city"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 200,
                                                                            "pattern": "[^ ]"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "city"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "state"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "state"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "naics_code"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "naics_code"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "rule"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "rule"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "rule"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "subject_type",
                          "rule"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "string",
                            "const": "smb.list.v1"
                          },
                          "subject_type": {
                            "type": "string",
                            "const": "person"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "display_name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "display_name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "relationship"
                                      },
                                      "relationship": {
                                        "type": "string",
                                        "const": "works_at"
                                      },
                                      "target_id": {
                                        "type": "string",
                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "relationship",
                                      "target_id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "group"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "all",
                                          "any"
                                        ]
                                      },
                                      "rules": {
                                        "minItems": 1,
                                        "maxItems": 20,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "display_name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "display_name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "relationship"
                                                },
                                                "relationship": {
                                                  "type": "string",
                                                  "const": "works_at"
                                                },
                                                "target_id": {
                                                  "type": "string",
                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "relationship",
                                                "target_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "display_name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "display_name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "relationship"
                                                          },
                                                          "relationship": {
                                                            "type": "string",
                                                            "const": "works_at"
                                                          },
                                                          "target_id": {
                                                            "type": "string",
                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "relationship",
                                                          "target_id"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "group"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "all",
                                                              "any"
                                                            ]
                                                          },
                                                          "rules": {
                                                            "minItems": 1,
                                                            "maxItems": 20,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "display_name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "display_name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "relationship"
                                                                    },
                                                                    "relationship": {
                                                                      "type": "string",
                                                                      "const": "works_at"
                                                                    },
                                                                    "target_id": {
                                                                      "type": "string",
                                                                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "relationship",
                                                                    "target_id"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "all",
                                                                        "any"
                                                                      ]
                                                                    },
                                                                    "rules": {
                                                                      "minItems": 1,
                                                                      "maxItems": 20,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "anyOf": [
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "display_name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "display_name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "relationship"
                                                                              },
                                                                              "relationship": {
                                                                                "type": "string",
                                                                                "const": "works_at"
                                                                              },
                                                                              "target_id": {
                                                                                "type": "string",
                                                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "relationship",
                                                                              "target_id"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "operator",
                                                                    "rules"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "not"
                                                                    },
                                                                    "rule": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "rule"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "operator",
                                                          "rules"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "not"
                                                          },
                                                          "rule": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "rule"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "relationship"
                                                        },
                                                        "relationship": {
                                                          "type": "string",
                                                          "const": "works_at"
                                                        },
                                                        "target_id": {
                                                          "type": "string",
                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "relationship",
                                                        "target_id"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "operator",
                                      "rules"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "not"
                                      },
                                      "rule": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "display_name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "display_name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "relationship"
                                              },
                                              "relationship": {
                                                "type": "string",
                                                "const": "works_at"
                                              },
                                              "target_id": {
                                                "type": "string",
                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "relationship",
                                              "target_id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "group"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "all",
                                                  "any"
                                                ]
                                              },
                                              "rules": {
                                                "minItems": 1,
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "relationship"
                                                        },
                                                        "relationship": {
                                                          "type": "string",
                                                          "const": "works_at"
                                                        },
                                                        "target_id": {
                                                          "type": "string",
                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "relationship",
                                                        "target_id"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "operator",
                                              "rules"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "not"
                                              },
                                              "rule": {
                                                "anyOf": [
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "display_name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "display_name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "relationship"
                                                      },
                                                      "relationship": {
                                                        "type": "string",
                                                        "const": "works_at"
                                                      },
                                                      "target_id": {
                                                        "type": "string",
                                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "relationship",
                                                      "target_id"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "group"
                                                      },
                                                      "operator": {
                                                        "type": "string",
                                                        "enum": [
                                                          "all",
                                                          "any"
                                                        ]
                                                      },
                                                      "rules": {
                                                        "minItems": 1,
                                                        "maxItems": 20,
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "operator",
                                                      "rules"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "not"
                                                      },
                                                      "rule": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "display_name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "display_name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "relationship"
                                                              },
                                                              "relationship": {
                                                                "type": "string",
                                                                "const": "works_at"
                                                              },
                                                              "target_id": {
                                                                "type": "string",
                                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "relationship",
                                                              "target_id"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "group"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "all",
                                                                  "any"
                                                                ]
                                                              },
                                                              "rules": {
                                                                "minItems": 1,
                                                                "maxItems": 20,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "operator",
                                                              "rules"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "not"
                                                              },
                                                              "rule": {
                                                                "anyOf": [
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "display_name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "display_name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "relationship"
                                                                      },
                                                                      "relationship": {
                                                                        "type": "string",
                                                                        "const": "works_at"
                                                                      },
                                                                      "target_id": {
                                                                        "type": "string",
                                                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "relationship",
                                                                      "target_id"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "rule"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "rule"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "rule"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "subject_type",
                          "rule"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "definition"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      },
      "get": {
        "operationId": "list_lists",
        "summary": "Find Lists",
        "description": "Find saved Lists in the selected Workspace. A restricted definition returns only recovery metadata, never an empty List. Use get_list_members for current members.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.list_lists.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.list_lists.request/properties/query/properties/after"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.list_lists.request/properties/query/properties/limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.list_lists.request/properties/query/properties/status"
            }
          },
          {
            "name": "subject_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.list_lists.request/properties/query/properties/subject_type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "lists": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema0"
                          }
                        },
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "lists",
                        "next_cursor"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/list_lists/response",
                  "title": "Find Lists Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}": {
      "get": {
        "operationId": "get_list",
        "summary": "Get a List",
        "description": "Read one saved List. A restricted definition returns only ID, version, lifecycle and subject type for recovery; no rule, columns or members. Use update_list with an authorized replacement definition, including while archived.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema0"
                            },
                            "workspace_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)$"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "definition": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "string",
                                      "const": "smb.list.v1"
                                    },
                                    "subject_type": {
                                      "type": "string",
                                      "const": "business"
                                    },
                                    "rule": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema11"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema11"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "subject_type",
                                    "rule"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "string",
                                      "const": "smb.list.v1"
                                    },
                                    "subject_type": {
                                      "type": "string",
                                      "const": "person"
                                    },
                                    "rule": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "subject_type",
                                    "rule"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "lifecycle_status": {
                              "type": "string",
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "count": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "const": "unknown"
                                    },
                                    "value": {
                                      "type": "null"
                                    },
                                    "as_of": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "value",
                                    "as_of"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "exact",
                                        "estimated"
                                      ]
                                    },
                                    "value": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "as_of": {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "value",
                                    "as_of"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "columns": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema21"
                              }
                            }
                          },
                          "required": [
                            "id",
                            "workspace_id",
                            "name",
                            "description",
                            "definition",
                            "version",
                            "lifecycle_status",
                            "count",
                            "columns"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema0"
                            },
                            "workspace_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)$"
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "lifecycle_status": {
                              "type": "string",
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "subject_type": {
                              "type": "string",
                              "enum": [
                                "business",
                                "person"
                              ]
                            },
                            "definition_status": {
                              "type": "string",
                              "const": "restricted"
                            }
                          },
                          "required": [
                            "id",
                            "workspace_id",
                            "version",
                            "lifecycle_status",
                            "subject_type",
                            "definition_status"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/get_list/response",
                  "title": "Get a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      },
      "patch": {
        "operationId": "update_list",
        "summary": "Edit a List",
        "description": "Change a List name, description or rule using its current version. Subject type cannot change. A restricted or archived List can replace its definition without restoring it or erasing private context. Reopen after a stale version.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "definition": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "business"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema0"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema2"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema3"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema4"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema6"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema8"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema10"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema10"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "person"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema14"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema15"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema16"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema16"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "lifecycle_status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "columns": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema20"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "name",
                        "description",
                        "definition",
                        "version",
                        "lifecycle_status",
                        "count",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "update_list"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/update_list/response",
                  "title": "Edit a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "definition": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "string",
                            "const": "smb.list.v1"
                          },
                          "subject_type": {
                            "type": "string",
                            "const": "business"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "status"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "status"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "website_url"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "website_url"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "city"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200,
                                            "pattern": "[^ ]"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "city"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200,
                                              "pattern": "[^ ]"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "state"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "state"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "naics_code"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "naics_code"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "group"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "all",
                                          "any"
                                        ]
                                      },
                                      "rules": {
                                        "minItems": 1,
                                        "maxItems": 20,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "status"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "status"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "website_url"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "website_url"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "city"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200,
                                                      "pattern": "[^ ]"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "city"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200,
                                                        "pattern": "[^ ]"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "state"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "state"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "naics_code"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "naics_code"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "status"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "status"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "website_url"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "website_url"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "city"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "city"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "minLength": 1,
                                                                  "maxLength": 200,
                                                                  "pattern": "[^ ]"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "state"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "state"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "naics_code"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "naics_code"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "group"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "all",
                                                              "any"
                                                            ]
                                                          },
                                                          "rules": {
                                                            "minItems": 1,
                                                            "maxItems": 20,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "status"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "status"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "website_url"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "website_url"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "city"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "city"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 200,
                                                                            "pattern": "[^ ]"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "state"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "state"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "naics_code"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "naics_code"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "all",
                                                                        "any"
                                                                      ]
                                                                    },
                                                                    "rules": {
                                                                      "minItems": 1,
                                                                      "maxItems": 20,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "anyOf": [
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "status"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "status"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "website_url"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "website_url"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "city"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "city"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "minLength": 1,
                                                                                      "maxLength": 200,
                                                                                      "pattern": "[^ ]"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "state"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "state"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "naics_code"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "naics_code"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "operator",
                                                                    "rules"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "not"
                                                                    },
                                                                    "rule": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "rule"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "operator",
                                                          "rules"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "not"
                                                          },
                                                          "rule": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "rule"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "operator",
                                      "rules"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "not"
                                      },
                                      "rule": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "status"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "status"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "website_url"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "website_url"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "city"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200,
                                                    "pattern": "[^ ]"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "city"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200,
                                                      "pattern": "[^ ]"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "state"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "state"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "naics_code"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "naics_code"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "group"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "all",
                                                  "any"
                                                ]
                                              },
                                              "rules": {
                                                "minItems": 1,
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "operator",
                                              "rules"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "not"
                                              },
                                              "rule": {
                                                "anyOf": [
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "status"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "status"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "website_url"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "website_url"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "city"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 200,
                                                            "pattern": "[^ ]"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "city"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "state"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "state"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "naics_code"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "naics_code"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "group"
                                                      },
                                                      "operator": {
                                                        "type": "string",
                                                        "enum": [
                                                          "all",
                                                          "any"
                                                        ]
                                                      },
                                                      "rules": {
                                                        "minItems": 1,
                                                        "maxItems": 20,
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "operator",
                                                      "rules"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "not"
                                                      },
                                                      "rule": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "status"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "status"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "website_url"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "website_url"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "city"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "minLength": 1,
                                                                    "maxLength": 200,
                                                                    "pattern": "[^ ]"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "city"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "state"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "state"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "naics_code"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "naics_code"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "group"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "all",
                                                                  "any"
                                                                ]
                                                              },
                                                              "rules": {
                                                                "minItems": 1,
                                                                "maxItems": 20,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "operator",
                                                              "rules"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "not"
                                                              },
                                                              "rule": {
                                                                "anyOf": [
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "status"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "status"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "website_url"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "website_url"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "city"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 200,
                                                                            "pattern": "[^ ]"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "city"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "state"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "state"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "naics_code"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "naics_code"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "rule"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "rule"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "rule"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "subject_type",
                          "rule"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "string",
                            "const": "smb.list.v1"
                          },
                          "subject_type": {
                            "type": "string",
                            "const": "person"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "display_name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "display_name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "relationship"
                                      },
                                      "relationship": {
                                        "type": "string",
                                        "const": "works_at"
                                      },
                                      "target_id": {
                                        "type": "string",
                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "relationship",
                                      "target_id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "group"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "all",
                                          "any"
                                        ]
                                      },
                                      "rules": {
                                        "minItems": 1,
                                        "maxItems": 20,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "display_name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "display_name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "relationship"
                                                },
                                                "relationship": {
                                                  "type": "string",
                                                  "const": "works_at"
                                                },
                                                "target_id": {
                                                  "type": "string",
                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "relationship",
                                                "target_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "display_name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "display_name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "relationship"
                                                          },
                                                          "relationship": {
                                                            "type": "string",
                                                            "const": "works_at"
                                                          },
                                                          "target_id": {
                                                            "type": "string",
                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "relationship",
                                                          "target_id"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "group"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "all",
                                                              "any"
                                                            ]
                                                          },
                                                          "rules": {
                                                            "minItems": 1,
                                                            "maxItems": 20,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "display_name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "display_name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "relationship"
                                                                    },
                                                                    "relationship": {
                                                                      "type": "string",
                                                                      "const": "works_at"
                                                                    },
                                                                    "target_id": {
                                                                      "type": "string",
                                                                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "relationship",
                                                                    "target_id"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "all",
                                                                        "any"
                                                                      ]
                                                                    },
                                                                    "rules": {
                                                                      "minItems": 1,
                                                                      "maxItems": 20,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "anyOf": [
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "display_name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "display_name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "relationship"
                                                                              },
                                                                              "relationship": {
                                                                                "type": "string",
                                                                                "const": "works_at"
                                                                              },
                                                                              "target_id": {
                                                                                "type": "string",
                                                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "relationship",
                                                                              "target_id"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "operator",
                                                                    "rules"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "not"
                                                                    },
                                                                    "rule": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "rule"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "operator",
                                                          "rules"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "not"
                                                          },
                                                          "rule": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "rule"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "relationship"
                                                        },
                                                        "relationship": {
                                                          "type": "string",
                                                          "const": "works_at"
                                                        },
                                                        "target_id": {
                                                          "type": "string",
                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "relationship",
                                                        "target_id"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "operator",
                                      "rules"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "not"
                                      },
                                      "rule": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "display_name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "display_name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "relationship"
                                              },
                                              "relationship": {
                                                "type": "string",
                                                "const": "works_at"
                                              },
                                              "target_id": {
                                                "type": "string",
                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "relationship",
                                              "target_id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "group"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "all",
                                                  "any"
                                                ]
                                              },
                                              "rules": {
                                                "minItems": 1,
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "relationship"
                                                        },
                                                        "relationship": {
                                                          "type": "string",
                                                          "const": "works_at"
                                                        },
                                                        "target_id": {
                                                          "type": "string",
                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "relationship",
                                                        "target_id"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "operator",
                                              "rules"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "not"
                                              },
                                              "rule": {
                                                "anyOf": [
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "display_name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "display_name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "relationship"
                                                      },
                                                      "relationship": {
                                                        "type": "string",
                                                        "const": "works_at"
                                                      },
                                                      "target_id": {
                                                        "type": "string",
                                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "relationship",
                                                      "target_id"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "group"
                                                      },
                                                      "operator": {
                                                        "type": "string",
                                                        "enum": [
                                                          "all",
                                                          "any"
                                                        ]
                                                      },
                                                      "rules": {
                                                        "minItems": 1,
                                                        "maxItems": 20,
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "operator",
                                                      "rules"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "not"
                                                      },
                                                      "rule": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "display_name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "display_name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "relationship"
                                                              },
                                                              "relationship": {
                                                                "type": "string",
                                                                "const": "works_at"
                                                              },
                                                              "target_id": {
                                                                "type": "string",
                                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "relationship",
                                                              "target_id"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "group"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "all",
                                                                  "any"
                                                                ]
                                                              },
                                                              "rules": {
                                                                "minItems": 1,
                                                                "maxItems": 20,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "operator",
                                                              "rules"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "not"
                                                              },
                                                              "rule": {
                                                                "anyOf": [
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "display_name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "display_name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "relationship"
                                                                      },
                                                                      "relationship": {
                                                                        "type": "string",
                                                                        "const": "works_at"
                                                                      },
                                                                      "target_id": {
                                                                        "type": "string",
                                                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "relationship",
                                                                      "target_id"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "rule"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "rule"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "rule"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "subject_type",
                          "rule"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "expected_version"
                ],
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "description"
                    ]
                  },
                  {
                    "required": [
                      "definition"
                    ]
                  }
                ]
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/archive": {
      "post": {
        "operationId": "archive_list",
        "summary": "Archive a List",
        "description": "Archive a List while retaining definitions, overrides and private values. Requires its current version; restore_list reverses archiving.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "definition": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "business"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "person"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "lifecycle_status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "columns": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema20"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "name",
                        "description",
                        "definition",
                        "version",
                        "lifecycle_status",
                        "count",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "archive_list"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/archive_list/response",
                  "title": "Archive a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/columns": {
      "post": {
        "operationId": "create_list_column",
        "summary": "Add a private List column",
        "description": "Add a text, number, boolean or date column to a List. Values stay private to this List and never modify canonical Record facts.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_list_column.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_list_column.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_list_column.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "column_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)$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "value_type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "number",
                            "boolean",
                            "date"
                          ]
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "list_id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "column_id",
                        "name",
                        "value_type",
                        "position",
                        "list_id",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "create_list_column"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_list_column/response",
                  "title": "Add a private List column Response"
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "column_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)$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "value_type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "number",
                            "boolean",
                            "date"
                          ]
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "list_id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "column_id",
                        "name",
                        "value_type",
                        "position",
                        "list_id",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "create_list_column"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_list_column/response",
                  "title": "Add a private List column Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "value_type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "boolean",
                      "date"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name",
                  "value_type",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/columns/{column_id}": {
      "patch": {
        "operationId": "update_list_column",
        "summary": "Rename a List column",
        "description": "Rename a private List column. Its value type is immutable; create a new column for a different type.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list_column.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list_column.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list_column.request/properties/path/properties/column_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.update_list_column.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "column_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)$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "value_type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "number",
                            "boolean",
                            "date"
                          ]
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "list_id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "column_id",
                        "name",
                        "value_type",
                        "position",
                        "list_id",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "update_list_column"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/update_list_column/response",
                  "title": "Rename a List column Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/columns/{column_id}/archive": {
      "post": {
        "operationId": "archive_list_column",
        "summary": "Archive a List column",
        "description": "Hide a private List column while retaining its values for audit.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list_column.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list_column.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list_column.request/properties/path/properties/column_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.archive_list_column.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "list_id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "column_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)$"
                        },
                        "archived": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "list_id",
                        "version",
                        "column_id",
                        "archived"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "archive_list_column"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/archive_list_column/response",
                  "title": "Archive a List column Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/entries/{member_id}/values/{column_id}": {
      "put": {
        "operationId": "set_list_entry_value",
        "summary": "Set a private List value",
        "description": "Set a typed private value for a current permitted member, or send null to clear it. Requires the List version and member-read scope. Does not change the Record.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_entry_value.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_entry_value.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_entry_value.request/properties/path/properties/column_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_entry_value.request/properties/path/properties/list_id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_entry_value.request/properties/path/properties/member_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "member_id": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9]{1,15}_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "column_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)$"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "value_type": {
                                      "type": "string",
                                      "const": "text"
                                    },
                                    "value": {
                                      "type": "string",
                                      "maxLength": 10000
                                    }
                                  },
                                  "required": [
                                    "value_type",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value_type": {
                                      "type": "string",
                                      "const": "number"
                                    },
                                    "value": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "value_type",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value_type": {
                                      "type": "string",
                                      "const": "boolean"
                                    },
                                    "value": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "value_type",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value_type": {
                                      "type": "string",
                                      "const": "date"
                                    },
                                    "value": {
                                      "type": "string",
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                    }
                                  },
                                  "required": [
                                    "value_type",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projection": {
                          "type": "string",
                          "enum": [
                            "public",
                            "workspace"
                          ]
                        },
                        "list_id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "member_id",
                        "column_id",
                        "value",
                        "projection",
                        "list_id",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "set_list_entry_value"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/set_list_entry_value/response",
                  "title": "Set a private List value Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "value_type": {
                                "type": "string",
                                "const": "text"
                              },
                              "value": {
                                "type": "string",
                                "maxLength": 10000
                              }
                            },
                            "required": [
                              "value_type",
                              "value"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value_type": {
                                "type": "string",
                                "const": "number"
                              },
                              "value": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "value_type",
                              "value"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value_type": {
                                "type": "string",
                                "const": "boolean"
                              },
                              "value": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "value_type",
                              "value"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value_type": {
                                "type": "string",
                                "const": "date"
                              },
                              "value": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              }
                            },
                            "required": [
                              "value_type",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "value",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/members": {
      "get": {
        "operationId": "get_list_members",
        "summary": "Get List members",
        "description": "Read a bounded live page of permitted members, inclusion reasons and private values. Requires businesses:read or people:read separately. Membership grants no access; totals remain unknown.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list_members.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list_members.request/properties/path/properties/list_id"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list_members.request/properties/query/properties/after"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list_members.request/properties/query/properties/expected_version"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list_members.request/properties/query/properties/limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evaluated_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "members": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1members.__local.get.responses.200.content.application~1json.schema.properties.data.__schema0"
                          }
                        },
                        "list_version": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "next_cursor",
                        "evaluated_at",
                        "count",
                        "members",
                        "list_version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/get_list_members/response",
                  "title": "Get List members Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/overrides/{member_id}": {
      "put": {
        "operationId": "set_list_override",
        "summary": "Include or exclude a List member",
        "description": "Include or exclude a permitted Record, or remove its override to use the rule again. Exclusion wins; overrides never grant access. Requires the List version and member-read scope.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_override.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_override.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_override.request/properties/path/properties/list_id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.set_list_override.request/properties/path/properties/member_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "member_id": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9]{1,15}_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "include",
                            "exclude",
                            "remove"
                          ]
                        },
                        "projection": {
                          "type": "string",
                          "enum": [
                            "public",
                            "workspace"
                          ]
                        },
                        "list_id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "member_id",
                        "action",
                        "projection",
                        "list_id",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "set_list_override"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/set_list_override/response",
                  "title": "Include or exclude a List member Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "include",
                      "exclude",
                      "remove"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "action",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/{list_id}/restore": {
      "post": {
        "operationId": "restore_list",
        "summary": "Restore a List",
        "description": "Restore an archived List and its retained private context using its current version.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.restore_list.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.restore_list.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.restore_list.request/properties/path/properties/list_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "definition": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "business"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "string",
                                  "const": "smb.list.v1"
                                },
                                "subject_type": {
                                  "type": "string",
                                  "const": "person"
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
                                        },
                                        {
                                          "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "group"
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                "all",
                                                "any"
                                              ]
                                            },
                                            "rules": {
                                              "minItems": 1,
                                              "maxItems": 20,
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                              }
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "operator",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "not"
                                            },
                                            "rule": {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "rule"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "schema_version",
                                "subject_type",
                                "rule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "lifecycle_status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "columns": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema20"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "name",
                        "description",
                        "definition",
                        "version",
                        "lifecycle_status",
                        "count",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "restore_list"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/restore_list/response",
                  "title": "Restore a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/capabilities": {
      "get": {
        "operationId": "get_list_capabilities",
        "summary": "Get List filters",
        "description": "Discover supported Business and Person filters before defining or previewing a List.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_list_capabilities.request/properties/headers/properties/workspace_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "const": "smb.list.capabilities.v1"
                        },
                        "subjects": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "enum": [
                              "business",
                              "person"
                            ]
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "fields": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "label": {
                                      "type": "string"
                                    },
                                    "value_type": {
                                      "type": "string",
                                      "const": "text"
                                    },
                                    "operators": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "eq",
                                          "ne",
                                          "contains",
                                          "in"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "label",
                                    "value_type",
                                    "operators"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "relationships": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "label": {
                                      "type": "string"
                                    },
                                    "target_prefix": {
                                      "type": "string",
                                      "const": "biz_"
                                    }
                                  },
                                  "required": [
                                    "label",
                                    "target_prefix"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "fields",
                              "relationships"
                            ],
                            "additionalProperties": false
                          },
                          "required": [
                            "business",
                            "person"
                          ]
                        },
                        "limits": {
                          "type": "object",
                          "properties": {
                            "rule_depth": {
                              "type": "number",
                              "const": 5
                            },
                            "rule_nodes": {
                              "type": "number",
                              "const": 100
                            },
                            "group_size": {
                              "type": "number",
                              "const": 20
                            },
                            "page_size": {
                              "type": "number",
                              "const": 100
                            },
                            "scan_window": {
                              "type": "number",
                              "const": 1000
                            },
                            "columns": {
                              "type": "number",
                              "const": 50
                            }
                          },
                          "required": [
                            "rule_depth",
                            "rule_nodes",
                            "group_size",
                            "page_size",
                            "scan_window",
                            "columns"
                          ],
                          "additionalProperties": false
                        },
                        "text_matching": {
                          "type": "string"
                        },
                        "missing_values": {
                          "type": "string"
                        },
                        "consistency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "version",
                        "subjects",
                        "limits",
                        "text_matching",
                        "missing_values",
                        "consistency"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/get_list_capabilities/response",
                  "title": "Get List filters Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/lists/draft": {
      "post": {
        "operationId": "draft_list",
        "summary": "Draft a List",
        "description": "Turn a description into a supported definition and read-only preview, or ask for clarification. One bounded AI call; no List is saved. Use create_list only after explicit approval of the draft.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.draft_list.request/properties/headers/properties/workspace_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "const": "needs_clarification"
                            },
                            "question": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "status",
                            "question"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "const": "ready"
                            },
                            "definition": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "string",
                                      "const": "smb.list.v1"
                                    },
                                    "subject_type": {
                                      "type": "string",
                                      "const": "business"
                                    },
                                    "rule": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema10"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "subject_type",
                                    "rule"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "string",
                                      "const": "smb.list.v1"
                                    },
                                    "subject_type": {
                                      "type": "string",
                                      "const": "person"
                                    },
                                    "rule": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
                                            },
                                            {
                                              "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema16"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "subject_type",
                                    "rule"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "explanations": {
                              "maxItems": 20,
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema20"
                              }
                            },
                            "preview": {
                              "type": "object",
                              "properties": {
                                "next_cursor": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evaluated_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                "count": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "unknown"
                                        },
                                        "value": {
                                          "type": "null"
                                        },
                                        "as_of": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "value",
                                        "as_of"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "exact",
                                            "estimated"
                                          ]
                                        },
                                        "value": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "as_of": {
                                          "type": "string",
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "value",
                                        "as_of"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "members": {
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema21"
                                  }
                                },
                                "list_version": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "next_cursor",
                                "evaluated_at",
                                "count",
                                "members",
                                "list_version"
                              ],
                              "additionalProperties": false
                            },
                            "requires_confirmation": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "required": [
                            "status",
                            "definition",
                            "explanations",
                            "preview",
                            "requires_confirmation"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/draft_list/response",
                  "title": "Draft a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "subject_type": {
                    "type": "string",
                    "enum": [
                      "business",
                      "person"
                    ]
                  }
                },
                "required": [
                  "prompt",
                  "subject_type"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/lists/preview": {
      "post": {
        "operationId": "preview_list",
        "summary": "Preview a List",
        "description": "Preview permitted members of a definition without saving it. Requires the corresponding businesses:read or people:read scope. Save only after reviewing the preview.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.preview_list.request/properties/headers/properties/workspace_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evaluated_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "count": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "value": {
                                  "type": "null"
                                },
                                "as_of": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "estimated"
                                  ]
                                },
                                "value": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "as_of": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "status",
                                "value",
                                "as_of"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "members": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/path:~1v1~1lists~1preview.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
                          }
                        },
                        "list_version": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "next_cursor",
                        "evaluated_at",
                        "count",
                        "members",
                        "list_version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/preview_list/response",
                  "title": "Preview a List Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "definition": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "string",
                            "const": "smb.list.v1"
                          },
                          "subject_type": {
                            "type": "string",
                            "const": "business"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "status"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "status"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "website_url"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "website_url"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "city"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200,
                                            "pattern": "[^ ]"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "city"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200,
                                              "pattern": "[^ ]"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "state"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "state"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "naics_code"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "naics_code"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "group"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "all",
                                          "any"
                                        ]
                                      },
                                      "rules": {
                                        "minItems": 1,
                                        "maxItems": 20,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "status"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "status"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "website_url"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "website_url"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "city"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200,
                                                      "pattern": "[^ ]"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "city"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200,
                                                        "pattern": "[^ ]"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "state"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "state"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "naics_code"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "naics_code"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "status"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "status"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "website_url"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "website_url"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "city"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "city"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "minLength": 1,
                                                                  "maxLength": 200,
                                                                  "pattern": "[^ ]"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "state"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "state"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "naics_code"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "naics_code"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "group"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "all",
                                                              "any"
                                                            ]
                                                          },
                                                          "rules": {
                                                            "minItems": 1,
                                                            "maxItems": 20,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "status"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "status"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "website_url"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "website_url"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "city"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "city"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 200,
                                                                            "pattern": "[^ ]"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "state"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "state"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "naics_code"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "naics_code"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "all",
                                                                        "any"
                                                                      ]
                                                                    },
                                                                    "rules": {
                                                                      "minItems": 1,
                                                                      "maxItems": 20,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "anyOf": [
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "status"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "status"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "website_url"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "website_url"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "city"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "city"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "minLength": 1,
                                                                                      "maxLength": 200,
                                                                                      "pattern": "[^ ]"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "state"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "state"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "naics_code"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "naics_code"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "operator",
                                                                    "rules"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "not"
                                                                    },
                                                                    "rule": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "rule"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "operator",
                                                          "rules"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "not"
                                                          },
                                                          "rule": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "rule"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "operator",
                                      "rules"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "not"
                                      },
                                      "rule": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "status"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "status"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "website_url"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "website_url"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "city"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200,
                                                    "pattern": "[^ ]"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "city"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200,
                                                      "pattern": "[^ ]"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "state"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "state"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "naics_code"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "naics_code"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "group"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "all",
                                                  "any"
                                                ]
                                              },
                                              "rules": {
                                                "minItems": 1,
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "status"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "website_url"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "city"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 200,
                                                                "pattern": "[^ ]"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "state"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "naics_code"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "status"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "website_url"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "city"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "minLength": 1,
                                                                          "maxLength": 200,
                                                                          "pattern": "[^ ]"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "state"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "naics_code"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "status"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "website_url"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "city"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "minLength": 1,
                                                                                    "maxLength": 200,
                                                                                    "pattern": "[^ ]"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "state"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "naics_code"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "operator",
                                              "rules"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "not"
                                              },
                                              "rule": {
                                                "anyOf": [
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "status"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "status"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "website_url"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "website_url"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "city"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 200,
                                                            "pattern": "[^ ]"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "city"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 200,
                                                              "pattern": "[^ ]"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "state"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "state"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "naics_code"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "naics_code"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "group"
                                                      },
                                                      "operator": {
                                                        "type": "string",
                                                        "enum": [
                                                          "all",
                                                          "any"
                                                        ]
                                                      },
                                                      "rules": {
                                                        "minItems": 1,
                                                        "maxItems": 20,
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "status"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "website_url"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "city"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "minLength": 1,
                                                                        "maxLength": 200,
                                                                        "pattern": "[^ ]"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "state"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "naics_code"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "status"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "website_url"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "city"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "minLength": 1,
                                                                                  "maxLength": 200,
                                                                                  "pattern": "[^ ]"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "state"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "naics_code"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "operator",
                                                      "rules"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "not"
                                                      },
                                                      "rule": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "status"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "status"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "website_url"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "website_url"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "city"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "minLength": 1,
                                                                    "maxLength": 200,
                                                                    "pattern": "[^ ]"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "city"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 200,
                                                                      "pattern": "[^ ]"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "state"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "state"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "naics_code"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "naics_code"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "group"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "all",
                                                                  "any"
                                                                ]
                                                              },
                                                              "rules": {
                                                                "minItems": 1,
                                                                "maxItems": 20,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "status"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "website_url"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "city"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "minLength": 1,
                                                                                "maxLength": 200,
                                                                                "pattern": "[^ ]"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "state"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "naics_code"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "operator",
                                                              "rules"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "not"
                                                              },
                                                              "rule": {
                                                                "anyOf": [
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "status"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "status"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "website_url"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "website_url"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "city"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 200,
                                                                            "pattern": "[^ ]"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "city"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "minLength": 1,
                                                                              "maxLength": 200,
                                                                              "pattern": "[^ ]"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "state"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "state"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "naics_code"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "naics_code"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "rule"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "rule"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "rule"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "subject_type",
                          "rule"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "string",
                            "const": "smb.list.v1"
                          },
                          "subject_type": {
                            "type": "string",
                            "const": "person"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "display_name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "ne",
                                              "contains"
                                            ]
                                          },
                                          "value": {
                                            "type": "string",
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "field"
                                          },
                                          "field": {
                                            "type": "string",
                                            "const": "display_name"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "const": "in"
                                          },
                                          "value": {
                                            "minItems": 1,
                                            "maxItems": 50,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 500
                                            }
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "field",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "relationship"
                                      },
                                      "relationship": {
                                        "type": "string",
                                        "const": "works_at"
                                      },
                                      "target_id": {
                                        "type": "string",
                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "relationship",
                                      "target_id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "group"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "all",
                                          "any"
                                        ]
                                      },
                                      "rules": {
                                        "minItems": 1,
                                        "maxItems": 20,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "display_name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "enum": [
                                                        "eq",
                                                        "ne",
                                                        "contains"
                                                      ]
                                                    },
                                                    "value": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "kind": {
                                                      "type": "string",
                                                      "const": "field"
                                                    },
                                                    "field": {
                                                      "type": "string",
                                                      "const": "display_name"
                                                    },
                                                    "operator": {
                                                      "type": "string",
                                                      "const": "in"
                                                    },
                                                    "value": {
                                                      "minItems": 1,
                                                      "maxItems": 50,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "kind",
                                                    "field",
                                                    "operator",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "relationship"
                                                },
                                                "relationship": {
                                                  "type": "string",
                                                  "const": "works_at"
                                                },
                                                "target_id": {
                                                  "type": "string",
                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "relationship",
                                                "target_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "group"
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "all",
                                                    "any"
                                                  ]
                                                },
                                                "rules": {
                                                  "minItems": 1,
                                                  "maxItems": 20,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "display_name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "ne",
                                                                  "contains"
                                                                ]
                                                              },
                                                              "value": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "field"
                                                              },
                                                              "field": {
                                                                "type": "string",
                                                                "const": "display_name"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "const": "in"
                                                              },
                                                              "value": {
                                                                "minItems": 1,
                                                                "maxItems": 50,
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 500
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "field",
                                                              "operator",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "relationship"
                                                          },
                                                          "relationship": {
                                                            "type": "string",
                                                            "const": "works_at"
                                                          },
                                                          "target_id": {
                                                            "type": "string",
                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "relationship",
                                                          "target_id"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "group"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "all",
                                                              "any"
                                                            ]
                                                          },
                                                          "rules": {
                                                            "minItems": 1,
                                                            "maxItems": 20,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "display_name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "eq",
                                                                            "ne",
                                                                            "contains"
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "field"
                                                                        },
                                                                        "field": {
                                                                          "type": "string",
                                                                          "const": "display_name"
                                                                        },
                                                                        "operator": {
                                                                          "type": "string",
                                                                          "const": "in"
                                                                        },
                                                                        "value": {
                                                                          "minItems": 1,
                                                                          "maxItems": 50,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "field",
                                                                        "operator",
                                                                        "value"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "relationship"
                                                                    },
                                                                    "relationship": {
                                                                      "type": "string",
                                                                      "const": "works_at"
                                                                    },
                                                                    "target_id": {
                                                                      "type": "string",
                                                                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "relationship",
                                                                    "target_id"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "all",
                                                                        "any"
                                                                      ]
                                                                    },
                                                                    "rules": {
                                                                      "minItems": 1,
                                                                      "maxItems": 20,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "anyOf": [
                                                                          {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "display_name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "eq",
                                                                                      "ne",
                                                                                      "contains"
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "kind": {
                                                                                    "type": "string",
                                                                                    "const": "field"
                                                                                  },
                                                                                  "field": {
                                                                                    "type": "string",
                                                                                    "const": "display_name"
                                                                                  },
                                                                                  "operator": {
                                                                                    "type": "string",
                                                                                    "const": "in"
                                                                                  },
                                                                                  "value": {
                                                                                    "minItems": 1,
                                                                                    "maxItems": 50,
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string",
                                                                                      "maxLength": 500
                                                                                    }
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "kind",
                                                                                  "field",
                                                                                  "operator",
                                                                                  "value"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "relationship"
                                                                              },
                                                                              "relationship": {
                                                                                "type": "string",
                                                                                "const": "works_at"
                                                                              },
                                                                              "target_id": {
                                                                                "type": "string",
                                                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "relationship",
                                                                              "target_id"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "operator",
                                                                    "rules"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "not"
                                                                    },
                                                                    "rule": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "rule"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "operator",
                                                          "rules"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "not"
                                                          },
                                                          "rule": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "rule"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "operator",
                                                "rules"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "not"
                                                },
                                                "rule": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "relationship"
                                                        },
                                                        "relationship": {
                                                          "type": "string",
                                                          "const": "works_at"
                                                        },
                                                        "target_id": {
                                                          "type": "string",
                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "relationship",
                                                        "target_id"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "rule"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "operator",
                                      "rules"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "not"
                                      },
                                      "rule": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "display_name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "ne",
                                                      "contains"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "field"
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "const": "display_name"
                                                  },
                                                  "operator": {
                                                    "type": "string",
                                                    "const": "in"
                                                  },
                                                  "value": {
                                                    "minItems": 1,
                                                    "maxItems": 50,
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 500
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "field",
                                                  "operator",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "relationship"
                                              },
                                              "relationship": {
                                                "type": "string",
                                                "const": "works_at"
                                              },
                                              "target_id": {
                                                "type": "string",
                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "relationship",
                                              "target_id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "group"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "all",
                                                  "any"
                                                ]
                                              },
                                              "rules": {
                                                "minItems": 1,
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "enum": [
                                                                "eq",
                                                                "ne",
                                                                "contains"
                                                              ]
                                                            },
                                                            "value": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "kind": {
                                                              "type": "string",
                                                              "const": "field"
                                                            },
                                                            "field": {
                                                              "type": "string",
                                                              "const": "display_name"
                                                            },
                                                            "operator": {
                                                              "type": "string",
                                                              "const": "in"
                                                            },
                                                            "value": {
                                                              "minItems": 1,
                                                              "maxItems": 50,
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string",
                                                                "maxLength": 500
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "kind",
                                                            "field",
                                                            "operator",
                                                            "value"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "relationship"
                                                        },
                                                        "relationship": {
                                                          "type": "string",
                                                          "const": "works_at"
                                                        },
                                                        "target_id": {
                                                          "type": "string",
                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "relationship",
                                                        "target_id"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "group"
                                                        },
                                                        "operator": {
                                                          "type": "string",
                                                          "enum": [
                                                            "all",
                                                            "any"
                                                          ]
                                                        },
                                                        "rules": {
                                                          "minItems": 1,
                                                          "maxItems": 20,
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "eq",
                                                                          "ne",
                                                                          "contains"
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "field"
                                                                      },
                                                                      "field": {
                                                                        "type": "string",
                                                                        "const": "display_name"
                                                                      },
                                                                      "operator": {
                                                                        "type": "string",
                                                                        "const": "in"
                                                                      },
                                                                      "value": {
                                                                        "minItems": 1,
                                                                        "maxItems": 50,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string",
                                                                          "maxLength": 500
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "field",
                                                                      "operator",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "relationship"
                                                                  },
                                                                  "relationship": {
                                                                    "type": "string",
                                                                    "const": "works_at"
                                                                  },
                                                                  "target_id": {
                                                                    "type": "string",
                                                                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "relationship",
                                                                  "target_id"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "group"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "all",
                                                                      "any"
                                                                    ]
                                                                  },
                                                                  "rules": {
                                                                    "minItems": 1,
                                                                    "maxItems": 20,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "anyOf": [
                                                                        {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "eq",
                                                                                    "ne",
                                                                                    "contains"
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "kind": {
                                                                                  "type": "string",
                                                                                  "const": "field"
                                                                                },
                                                                                "field": {
                                                                                  "type": "string",
                                                                                  "const": "display_name"
                                                                                },
                                                                                "operator": {
                                                                                  "type": "string",
                                                                                  "const": "in"
                                                                                },
                                                                                "value": {
                                                                                  "minItems": 1,
                                                                                  "maxItems": 50,
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string",
                                                                                    "maxLength": 500
                                                                                  }
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "kind",
                                                                                "field",
                                                                                "operator",
                                                                                "value"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "relationship"
                                                                            },
                                                                            "relationship": {
                                                                              "type": "string",
                                                                              "const": "works_at"
                                                                            },
                                                                            "target_id": {
                                                                              "type": "string",
                                                                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "relationship",
                                                                            "target_id"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "operator",
                                                                  "rules"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "not"
                                                                  },
                                                                  "rule": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "rule"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "operator",
                                                        "rules"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "kind": {
                                                          "type": "string",
                                                          "const": "not"
                                                        },
                                                        "rule": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "kind",
                                                        "rule"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "operator",
                                              "rules"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "not"
                                              },
                                              "rule": {
                                                "anyOf": [
                                                  {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "display_name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "eq",
                                                              "ne",
                                                              "contains"
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": "string",
                                                            "maxLength": 500
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "kind": {
                                                            "type": "string",
                                                            "const": "field"
                                                          },
                                                          "field": {
                                                            "type": "string",
                                                            "const": "display_name"
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "const": "in"
                                                          },
                                                          "value": {
                                                            "minItems": 1,
                                                            "maxItems": 50,
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "kind",
                                                          "field",
                                                          "operator",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "relationship"
                                                      },
                                                      "relationship": {
                                                        "type": "string",
                                                        "const": "works_at"
                                                      },
                                                      "target_id": {
                                                        "type": "string",
                                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "relationship",
                                                      "target_id"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "group"
                                                      },
                                                      "operator": {
                                                        "type": "string",
                                                        "enum": [
                                                          "all",
                                                          "any"
                                                        ]
                                                      },
                                                      "rules": {
                                                        "minItems": 1,
                                                        "maxItems": 20,
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "eq",
                                                                        "ne",
                                                                        "contains"
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "kind": {
                                                                      "type": "string",
                                                                      "const": "field"
                                                                    },
                                                                    "field": {
                                                                      "type": "string",
                                                                      "const": "display_name"
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "const": "in"
                                                                    },
                                                                    "value": {
                                                                      "minItems": 1,
                                                                      "maxItems": 50,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string",
                                                                        "maxLength": 500
                                                                      }
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "kind",
                                                                    "field",
                                                                    "operator",
                                                                    "value"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "relationship"
                                                                },
                                                                "relationship": {
                                                                  "type": "string",
                                                                  "const": "works_at"
                                                                },
                                                                "target_id": {
                                                                  "type": "string",
                                                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "relationship",
                                                                "target_id"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "group"
                                                                },
                                                                "operator": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "all",
                                                                    "any"
                                                                  ]
                                                                },
                                                                "rules": {
                                                                  "minItems": 1,
                                                                  "maxItems": 20,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                  "eq",
                                                                                  "ne",
                                                                                  "contains"
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "kind": {
                                                                                "type": "string",
                                                                                "const": "field"
                                                                              },
                                                                              "field": {
                                                                                "type": "string",
                                                                                "const": "display_name"
                                                                              },
                                                                              "operator": {
                                                                                "type": "string",
                                                                                "const": "in"
                                                                              },
                                                                              "value": {
                                                                                "minItems": 1,
                                                                                "maxItems": 50,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "string",
                                                                                  "maxLength": 500
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "kind",
                                                                              "field",
                                                                              "operator",
                                                                              "value"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "relationship"
                                                                          },
                                                                          "relationship": {
                                                                            "type": "string",
                                                                            "const": "works_at"
                                                                          },
                                                                          "target_id": {
                                                                            "type": "string",
                                                                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "relationship",
                                                                          "target_id"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "operator",
                                                                "rules"
                                                              ],
                                                              "additionalProperties": false
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "kind": {
                                                                  "type": "string",
                                                                  "const": "not"
                                                                },
                                                                "rule": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "required": [
                                                                "kind",
                                                                "rule"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "operator",
                                                      "rules"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "not"
                                                      },
                                                      "rule": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "display_name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "eq",
                                                                      "ne",
                                                                      "contains"
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "kind": {
                                                                    "type": "string",
                                                                    "const": "field"
                                                                  },
                                                                  "field": {
                                                                    "type": "string",
                                                                    "const": "display_name"
                                                                  },
                                                                  "operator": {
                                                                    "type": "string",
                                                                    "const": "in"
                                                                  },
                                                                  "value": {
                                                                    "minItems": 1,
                                                                    "maxItems": 50,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string",
                                                                      "maxLength": 500
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "kind",
                                                                  "field",
                                                                  "operator",
                                                                  "value"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "relationship"
                                                              },
                                                              "relationship": {
                                                                "type": "string",
                                                                "const": "works_at"
                                                              },
                                                              "target_id": {
                                                                "type": "string",
                                                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "relationship",
                                                              "target_id"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "group"
                                                              },
                                                              "operator": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "all",
                                                                  "any"
                                                                ]
                                                              },
                                                              "rules": {
                                                                "minItems": 1,
                                                                "maxItems": 20,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "eq",
                                                                                "ne",
                                                                                "contains"
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "kind": {
                                                                              "type": "string",
                                                                              "const": "field"
                                                                            },
                                                                            "field": {
                                                                              "type": "string",
                                                                              "const": "display_name"
                                                                            },
                                                                            "operator": {
                                                                              "type": "string",
                                                                              "const": "in"
                                                                            },
                                                                            "value": {
                                                                              "minItems": 1,
                                                                              "maxItems": 50,
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string",
                                                                                "maxLength": 500
                                                                              }
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "kind",
                                                                            "field",
                                                                            "operator",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "kind": {
                                                                          "type": "string",
                                                                          "const": "relationship"
                                                                        },
                                                                        "relationship": {
                                                                          "type": "string",
                                                                          "const": "works_at"
                                                                        },
                                                                        "target_id": {
                                                                          "type": "string",
                                                                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "kind",
                                                                        "relationship",
                                                                        "target_id"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "operator",
                                                              "rules"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "kind": {
                                                                "type": "string",
                                                                "const": "not"
                                                              },
                                                              "rule": {
                                                                "anyOf": [
                                                                  {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "display_name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "eq",
                                                                              "ne",
                                                                              "contains"
                                                                            ]
                                                                          },
                                                                          "value": {
                                                                            "type": "string",
                                                                            "maxLength": 500
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "kind": {
                                                                            "type": "string",
                                                                            "const": "field"
                                                                          },
                                                                          "field": {
                                                                            "type": "string",
                                                                            "const": "display_name"
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "const": "in"
                                                                          },
                                                                          "value": {
                                                                            "minItems": 1,
                                                                            "maxItems": 50,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string",
                                                                              "maxLength": 500
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "kind",
                                                                          "field",
                                                                          "operator",
                                                                          "value"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "kind": {
                                                                        "type": "string",
                                                                        "const": "relationship"
                                                                      },
                                                                      "relationship": {
                                                                        "type": "string",
                                                                        "const": "works_at"
                                                                      },
                                                                      "target_id": {
                                                                        "type": "string",
                                                                        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "kind",
                                                                      "relationship",
                                                                      "target_id"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "kind",
                                                              "rule"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "rule"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "rule"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "subject_type",
                          "rule"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "page": {
                    "default": {
                      "limit": 50
                    },
                    "type": "object",
                    "properties": {
                      "after": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4096
                      },
                      "limit": {
                        "default": 50,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "definition"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/people": {
      "post": {
        "operationId": "create_person",
        "summary": "Create a private Person",
        "description": "Create a Person in the selected Workspace from a name, optionally recording a works-at Business relationship. The relationship requires Business access and grants no new access.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_person.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_person.request/properties/headers/properties/workspace_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "display_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "display_name",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "person.create"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_person/response",
                  "title": "Create a private Person Response"
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "display_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "display_name",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "const": "person.create"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "action_receipt",
                    "idempotent_replay"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_person/response",
                  "title": "Create a private Person Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  }
                },
                "required": [
                  "display_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/people/{person_id}": {
      "get": {
        "operationId": "get_person",
        "summary": "Get a private Person",
        "description": "Read an authorized Person name and version in the selected Workspace. Contact details are not included.",
        "tags": [
          "Tasks"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_person.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "person_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_person.request/properties/path/properties/person_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "workspace_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)$"
                        },
                        "display_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "display_name",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/get_person/response",
                  "title": "Get a private Person Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/valuation-intakes": {
      "post": {
        "operationId": "create_valuation_intake",
        "summary": "Create a valuation intake",
        "description": "Attaches a consented valuation intake to an existing canonical Business, saves the normalized valuation input before compute, runs the valuation, and saves the immutable public result.",
        "tags": [
          "Valuations"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_valuation_intake.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_valuation_intake.request/properties/headers/properties/workspace_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                    },
                    "intake_id": {
                      "type": "string",
                      "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                    },
                    "status": {
                      "const": "completed"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$"
                    },
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v1\\.17\\.(?:0|[1-9][0-9]*)$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 5,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "rank",
                                      "question",
                                      "improves"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "policy_reference"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "input_fields_used": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "annual_revenue",
                                            "cash_flow",
                                            "cash_flows",
                                            "disposal_costs",
                                            "ebitda",
                                            "employee_count",
                                            "gross_asset_value",
                                            "net_operating_income",
                                            "replacement_cost",
                                            "royalty_base",
                                            "sde",
                                            "total_assets",
                                            "total_liabilities"
                                          ]
                                        }
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "input_fields_used",
                                      "benchmark_support"
                                    ]
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 5,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 5
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "rank",
                                        "question",
                                        "improves"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "policy_reference"
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "benchmark_snapshot_id",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v(?:1\\.(?:2[3-9]|[3-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)|(?:[2-9]|[1-9][0-9]+)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*))$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 32,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 32
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "question_id",
                                      "rank",
                                      "question",
                                      "improves",
                                      "why",
                                      "answer_paths"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "sba_program": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "7a",
                                            "504",
                                            "other_sba",
                                            "not_sba"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "program_missing",
                                        "program_not_applicable",
                                        "program_unsupported",
                                        "policy_date_missing",
                                        "current_reference"
                                      ]
                                    },
                                    "transaction_category": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "unspecified",
                                            "initial_acquisition",
                                            "business_expansion",
                                            "owner_buyout",
                                            "esop_or_cooperative"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "transaction_category_source": {
                                      "type": "string",
                                      "enum": [
                                        "supplied",
                                        "sop81_initial_acquisition_default",
                                        "not_applicable"
                                      ]
                                    },
                                    "business_purchase_price": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "flags": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "pattern": "^[\\s\\S]{1,120}:[a-z][a-z0-9_]{0,99}$",
                                            "maxLength": 221
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "present",
                                              "missing",
                                              "review"
                                            ]
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "status",
                                          "message"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "sba_program",
                                    "policy_reference",
                                    "policy_status",
                                    "transaction_category",
                                    "transaction_category_source",
                                    "business_purchase_price",
                                    "flags"
                                  ]
                                },
                                "scope": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "included_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "embedded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "excluded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "partial_ownership_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "included_items",
                                    "embedded_items",
                                    "excluded_items",
                                    "partial_ownership_items"
                                  ],
                                  "x-smb-invariant": "Counts must reconcile exactly to results[].scope; partial_ownership_items cannot exceed included_items."
                                }
                              },
                              "required": [
                                "status",
                                "scope",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "next_questions",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          },
                                          "naics": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "requested_code": {
                                                    "type": "string",
                                                    "pattern": "^[0-9]{6}$"
                                                  },
                                                  "selected_code": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "pattern": "^[0-9]{6}$"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "match": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_found",
                                                      "exact_six_digit",
                                                      "exact_six_digit_context_only"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "requested_code",
                                                  "selected_code",
                                                  "match"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "fallback_lineage": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_needed",
                                                      "inferred",
                                                      "no_safe_fallback",
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "donor_naics_codes": {
                                                    "type": "array",
                                                    "uniqueItems": true,
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^[0-9]{6}$"
                                                    }
                                                  },
                                                  "confidence": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "high",
                                                          "moderate",
                                                          "limited"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "permitted_use": {
                                                    "type": "string",
                                                    "enum": [
                                                      "missing_input_screening",
                                                      "context_only",
                                                      "withheld",
                                                      "not_applicable"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "outcome",
                                                  "donor_naics_codes",
                                                  "confidence",
                                                  "permitted_use"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families",
                                          "naics",
                                          "fallback_lineage"
                                        ]
                                      },
                                      "input_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "evidenced": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "verified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "unverified_or_modeled": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "undated": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stale": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "evidenced",
                                          "verified",
                                          "unverified_or_modeled",
                                          "undated",
                                          "stale"
                                        ]
                                      },
                                      "assumption_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "market_supported": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "caller_supplied": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "policy_default": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "market_supported",
                                          "caller_supplied",
                                          "policy_default"
                                        ]
                                      },
                                      "input_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "adjusted_assets",
                                                "annual_revenue",
                                                "capital_structure",
                                                "cash_flows",
                                                "completion_costs",
                                                "current_market_value",
                                                "disposal_costs",
                                                "ebitda",
                                                "employee_count",
                                                "financial_history",
                                                "inventory_gross_value",
                                                "liabilities",
                                                "net_operating_income",
                                                "owner_labor",
                                                "projected_revenue",
                                                "replacement_cost",
                                                "sde",
                                                "selling_costs"
                                              ]
                                            },
                                            "evidence_status": {
                                              "type": "string",
                                              "enum": [
                                                "missing",
                                                "current_verified_attestation",
                                                "undated_verified_attestation",
                                                "stale_verified_attestation",
                                                "future_dated",
                                                "unverified_or_modeled"
                                              ]
                                            },
                                            "source_types": {
                                              "type": "array",
                                              "uniqueItems": true,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "owner_input",
                                                  "advisor_input",
                                                  "lender_input",
                                                  "user_scenario",
                                                  "market_comparable",
                                                  "appraisal",
                                                  "public_dataset",
                                                  "internal_benchmark",
                                                  "model_policy",
                                                  "financial_statement",
                                                  "tax_return",
                                                  "other"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "evidence_status",
                                            "source_types"
                                          ]
                                        },
                                        "x-smb-invariant": "Fields are unique; length and evidence-status counts reconcile to input_support; source_types are sorted and empty exactly when evidence_status is missing."
                                      },
                                      "assumption_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "category": {
                                              "type": "string",
                                              "enum": [
                                                "asset_obsolescence",
                                                "asset_recovery",
                                                "capitalization_and_discounting",
                                                "growth",
                                                "intangible_economics",
                                                "market_comparables",
                                                "market_pricing",
                                                "tax"
                                              ]
                                            },
                                            "source_type": {
                                              "type": "string",
                                              "enum": [
                                                "owner_input",
                                                "advisor_input",
                                                "lender_input",
                                                "user_scenario",
                                                "market_comparable",
                                                "appraisal",
                                                "public_dataset",
                                                "internal_benchmark",
                                                "model_policy",
                                                "financial_statement",
                                                "tax_return",
                                                "other"
                                              ]
                                            },
                                            "verification": {
                                              "type": "string",
                                              "enum": [
                                                "request_attested_verified",
                                                "request_attested_unverified",
                                                "modeled"
                                              ]
                                            },
                                            "timing": {
                                              "type": "string",
                                              "enum": [
                                                "current",
                                                "undated",
                                                "stale",
                                                "future_dated"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "category",
                                            "source_type",
                                            "verification",
                                            "timing"
                                          ]
                                        }
                                      },
                                      "data_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "string",
                                          "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                          "maxLength": 500
                                        }
                                      },
                                      "data_not_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                              "maxLength": 500
                                            },
                                            "why": {
                                              "type": "string",
                                              "enum": [
                                                "This information did not affect this valuation.",
                                                "Value does not currently use this information."
                                              ]
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "why"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "data_used",
                                      "data_not_used",
                                      "input_support",
                                      "assumption_support",
                                      "input_provenance",
                                      "assumption_provenance",
                                      "benchmark_support"
                                    ],
                                    "x-smb-data-usage-invariant": "data_used and data_not_used are individually sorted, contain unique public field paths, never overlap, and never expose submitted values. Conflicts are explained through next_questions rather than a third input status."
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 32,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 32
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "question_id",
                                        "rank",
                                        "question",
                                        "improves",
                                        "why",
                                        "answer_paths"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "sba_program": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "7a",
                                              "504",
                                              "other_sba",
                                              "not_sba"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "program_missing",
                                          "program_not_applicable",
                                          "program_unsupported",
                                          "policy_date_missing",
                                          "current_reference"
                                        ]
                                      },
                                      "transaction_category": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "unspecified",
                                              "initial_acquisition",
                                              "business_expansion",
                                              "owner_buyout",
                                              "esop_or_cooperative"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "transaction_category_source": {
                                        "type": "string",
                                        "enum": [
                                          "supplied",
                                          "sop81_initial_acquisition_default",
                                          "not_applicable"
                                        ]
                                      },
                                      "business_purchase_price": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "flags": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "pattern": "^[a-z][a-z0-9_]{0,99}$",
                                              "maxLength": 100
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "present",
                                                "missing",
                                                "review"
                                              ]
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "status",
                                            "message"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "sba_program",
                                      "policy_reference",
                                      "policy_status",
                                      "transaction_category",
                                      "transaction_category_source",
                                      "business_purchase_price",
                                      "flags"
                                    ]
                                  },
                                  "financial_reconciliation": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period_end": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "selected_period_type": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "annual",
                                              "ltm",
                                              "interim"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "annual_revenue": {
                                        "oneOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sde": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "ebitda": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "top_level_reconciliation": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "sde": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          },
                                          "ebitda": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "sde",
                                          "ebitda"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "selected_period_end",
                                      "selected_period_type",
                                      "annual_revenue",
                                      "sde",
                                      "ebitda",
                                      "top_level_reconciliation"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "included"
                                          },
                                          "ownership_fraction": {
                                            "type": "number",
                                            "exclusiveMinimum": 0,
                                            "maximum": 1
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "embedded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "excluded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "scope",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "financial_reconciliation",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            },
                            "benchmark_release": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "family": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "version": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "snapshot_id": {
                                  "type": "string",
                                  "pattern": "^bm_[0-9a-f]{16}$"
                                }
                              },
                              "required": [
                                "family",
                                "version",
                                "snapshot_id"
                              ],
                              "x-smb-must-match": "$.benchmark_snapshot_id"
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "scope",
                            "benchmark_snapshot_id",
                            "benchmark_release",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        }
                      ],
                      "x-smb-public-contract": "smb.api.valuation.response.v8",
                      "x-smb-value-contract": "smb.value.result.v2",
                      "x-smb-full-receipt-contract": "smb.value.receipt.v1",
                      "x-smb-traceability": "valuation_id, benchmark_snapshot_id, model_release, and result_hash identify the public result. result_hash covers the deterministic canonical JSON public projection after API-owned question IDs are added, excluding result_hash itself; the complete Value receipt and workpapers remain private.",
                      "x-smb-proprietary-boundary": {
                        "public": "Rounded conclusions and ranges, broad methodology rationale, rounded alternatives, bounded portfolio scope, enum-only material input and assumption provenance, value-free data_used and data_not_used field paths, evidence and assumption support counts, benchmark release and fallback lineage, normalized financial reconciliation, material gaps, next questions, lending readiness, and integrity identifiers.",
                        "retained": "Exact multiples, priors, formulas, weights, scores, thresholds, raw benchmark cells, donor logic, simulation seeds and distributions, source names and references, exclusion reasons, internal method workpapers, and the complete receipt.",
                        "enforcement": "REST and MCP return the same exact object and reject unknown or additional upstream fields."
                      },
                      "x-smb-response-safeguards": {
                        "response_detail": "summary",
                        "maximum_buffered_value_response_bytes": 8000000,
                        "item_count_limit": null,
                        "enforcement": "The API rejects projected synchronous summaries above the response budget before Value execution, requests smb.value.result.v2, deeply validates its exact public-safe shape, returns each item once, and retains the bounded response reader as a fail-closed backstop.",
                        "maximum_projected_value_response_bytes": 8000000
                      },
                      "x-smb-persistence": "not_implemented",
                      "x-smb-model-release-boundary": {
                        "legacy": "smb.value.engine.v1.17.x",
                        "current": "smb.value.engine.v1.23.0 and later",
                        "discriminator": "model_release"
                      },
                      "x-smb-cross-field-invariants": [
                        "Every range requires low <= high.",
                        "item_count must equal results.length.",
                        "benchmark_release.snapshot_id must equal benchmark_snapshot_id for v1.23 and later.",
                        "portfolio.scope must reconcile exactly to results[].scope for v1.23 and later.",
                        "input_provenance must reconcile to input_support without exposing free-text evidence details.",
                        "For v1.23 and later, data_used and data_not_used are sorted, disjoint, value-free, and together account for submitted valuation data; material conflicts appear in next_questions."
                      ],
                      "x-smb-next-question-semantics": "Next questions are advisory. Modern Value responses return up to 32 ranked, deduplicated actionable questions per portfolio or item so an agent can collect material facts in one conversation. A UI may show a smaller top subset. For an unpersisted run, an agent should collect or confirm useful answers at the listed answer_paths and make a second explicit run_valuation call only when the caller asks for a revised valuation. For a persisted Workspace valuation, REST callers submit a question_id and value to POST /v1/valuations/{valuation_id}/answers; the server applies the first stored answer_path, creates a linked successor, and never mutates the source valuation."
                    }
                  },
                  "required": [
                    "business_id",
                    "intake_id",
                    "status",
                    "idempotent_replay",
                    "valuation_id",
                    "result"
                  ],
                  "x-smb-persistence-order": "The intake is attached to the authorized Business and normalized input is committed before compute; the validated public result is committed after compute.",
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_valuation_intake/response",
                  "title": "Create a valuation intake response"
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                    },
                    "intake_id": {
                      "type": "string",
                      "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                    },
                    "status": {
                      "const": "completed"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$"
                    },
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v1\\.17\\.(?:0|[1-9][0-9]*)$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 5,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "rank",
                                      "question",
                                      "improves"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "policy_reference"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "input_fields_used": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "annual_revenue",
                                            "cash_flow",
                                            "cash_flows",
                                            "disposal_costs",
                                            "ebitda",
                                            "employee_count",
                                            "gross_asset_value",
                                            "net_operating_income",
                                            "replacement_cost",
                                            "royalty_base",
                                            "sde",
                                            "total_assets",
                                            "total_liabilities"
                                          ]
                                        }
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "input_fields_used",
                                      "benchmark_support"
                                    ]
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 5,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 5
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "rank",
                                        "question",
                                        "improves"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "policy_reference"
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "benchmark_snapshot_id",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v(?:1\\.(?:2[3-9]|[3-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)|(?:[2-9]|[1-9][0-9]+)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*))$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 32,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 32
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "question_id",
                                      "rank",
                                      "question",
                                      "improves",
                                      "why",
                                      "answer_paths"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "sba_program": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "7a",
                                            "504",
                                            "other_sba",
                                            "not_sba"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "program_missing",
                                        "program_not_applicable",
                                        "program_unsupported",
                                        "policy_date_missing",
                                        "current_reference"
                                      ]
                                    },
                                    "transaction_category": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "unspecified",
                                            "initial_acquisition",
                                            "business_expansion",
                                            "owner_buyout",
                                            "esop_or_cooperative"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "transaction_category_source": {
                                      "type": "string",
                                      "enum": [
                                        "supplied",
                                        "sop81_initial_acquisition_default",
                                        "not_applicable"
                                      ]
                                    },
                                    "business_purchase_price": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "flags": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "pattern": "^[\\s\\S]{1,120}:[a-z][a-z0-9_]{0,99}$",
                                            "maxLength": 221
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "present",
                                              "missing",
                                              "review"
                                            ]
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "status",
                                          "message"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "sba_program",
                                    "policy_reference",
                                    "policy_status",
                                    "transaction_category",
                                    "transaction_category_source",
                                    "business_purchase_price",
                                    "flags"
                                  ]
                                },
                                "scope": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "included_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "embedded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "excluded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "partial_ownership_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "included_items",
                                    "embedded_items",
                                    "excluded_items",
                                    "partial_ownership_items"
                                  ],
                                  "x-smb-invariant": "Counts must reconcile exactly to results[].scope; partial_ownership_items cannot exceed included_items."
                                }
                              },
                              "required": [
                                "status",
                                "scope",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "next_questions",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          },
                                          "naics": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "requested_code": {
                                                    "type": "string",
                                                    "pattern": "^[0-9]{6}$"
                                                  },
                                                  "selected_code": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "pattern": "^[0-9]{6}$"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "match": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_found",
                                                      "exact_six_digit",
                                                      "exact_six_digit_context_only"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "requested_code",
                                                  "selected_code",
                                                  "match"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "fallback_lineage": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_needed",
                                                      "inferred",
                                                      "no_safe_fallback",
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "donor_naics_codes": {
                                                    "type": "array",
                                                    "uniqueItems": true,
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^[0-9]{6}$"
                                                    }
                                                  },
                                                  "confidence": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "high",
                                                          "moderate",
                                                          "limited"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "permitted_use": {
                                                    "type": "string",
                                                    "enum": [
                                                      "missing_input_screening",
                                                      "context_only",
                                                      "withheld",
                                                      "not_applicable"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "outcome",
                                                  "donor_naics_codes",
                                                  "confidence",
                                                  "permitted_use"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families",
                                          "naics",
                                          "fallback_lineage"
                                        ]
                                      },
                                      "input_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "evidenced": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "verified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "unverified_or_modeled": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "undated": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stale": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "evidenced",
                                          "verified",
                                          "unverified_or_modeled",
                                          "undated",
                                          "stale"
                                        ]
                                      },
                                      "assumption_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "market_supported": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "caller_supplied": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "policy_default": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "market_supported",
                                          "caller_supplied",
                                          "policy_default"
                                        ]
                                      },
                                      "input_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "adjusted_assets",
                                                "annual_revenue",
                                                "capital_structure",
                                                "cash_flows",
                                                "completion_costs",
                                                "current_market_value",
                                                "disposal_costs",
                                                "ebitda",
                                                "employee_count",
                                                "financial_history",
                                                "inventory_gross_value",
                                                "liabilities",
                                                "net_operating_income",
                                                "owner_labor",
                                                "projected_revenue",
                                                "replacement_cost",
                                                "sde",
                                                "selling_costs"
                                              ]
                                            },
                                            "evidence_status": {
                                              "type": "string",
                                              "enum": [
                                                "missing",
                                                "current_verified_attestation",
                                                "undated_verified_attestation",
                                                "stale_verified_attestation",
                                                "future_dated",
                                                "unverified_or_modeled"
                                              ]
                                            },
                                            "source_types": {
                                              "type": "array",
                                              "uniqueItems": true,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "owner_input",
                                                  "advisor_input",
                                                  "lender_input",
                                                  "user_scenario",
                                                  "market_comparable",
                                                  "appraisal",
                                                  "public_dataset",
                                                  "internal_benchmark",
                                                  "model_policy",
                                                  "financial_statement",
                                                  "tax_return",
                                                  "other"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "evidence_status",
                                            "source_types"
                                          ]
                                        },
                                        "x-smb-invariant": "Fields are unique; length and evidence-status counts reconcile to input_support; source_types are sorted and empty exactly when evidence_status is missing."
                                      },
                                      "assumption_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "category": {
                                              "type": "string",
                                              "enum": [
                                                "asset_obsolescence",
                                                "asset_recovery",
                                                "capitalization_and_discounting",
                                                "growth",
                                                "intangible_economics",
                                                "market_comparables",
                                                "market_pricing",
                                                "tax"
                                              ]
                                            },
                                            "source_type": {
                                              "type": "string",
                                              "enum": [
                                                "owner_input",
                                                "advisor_input",
                                                "lender_input",
                                                "user_scenario",
                                                "market_comparable",
                                                "appraisal",
                                                "public_dataset",
                                                "internal_benchmark",
                                                "model_policy",
                                                "financial_statement",
                                                "tax_return",
                                                "other"
                                              ]
                                            },
                                            "verification": {
                                              "type": "string",
                                              "enum": [
                                                "request_attested_verified",
                                                "request_attested_unverified",
                                                "modeled"
                                              ]
                                            },
                                            "timing": {
                                              "type": "string",
                                              "enum": [
                                                "current",
                                                "undated",
                                                "stale",
                                                "future_dated"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "category",
                                            "source_type",
                                            "verification",
                                            "timing"
                                          ]
                                        }
                                      },
                                      "data_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "string",
                                          "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                          "maxLength": 500
                                        }
                                      },
                                      "data_not_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                              "maxLength": 500
                                            },
                                            "why": {
                                              "type": "string",
                                              "enum": [
                                                "This information did not affect this valuation.",
                                                "Value does not currently use this information."
                                              ]
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "why"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "data_used",
                                      "data_not_used",
                                      "input_support",
                                      "assumption_support",
                                      "input_provenance",
                                      "assumption_provenance",
                                      "benchmark_support"
                                    ],
                                    "x-smb-data-usage-invariant": "data_used and data_not_used are individually sorted, contain unique public field paths, never overlap, and never expose submitted values. Conflicts are explained through next_questions rather than a third input status."
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 32,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 32
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "question_id",
                                        "rank",
                                        "question",
                                        "improves",
                                        "why",
                                        "answer_paths"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "sba_program": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "7a",
                                              "504",
                                              "other_sba",
                                              "not_sba"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "program_missing",
                                          "program_not_applicable",
                                          "program_unsupported",
                                          "policy_date_missing",
                                          "current_reference"
                                        ]
                                      },
                                      "transaction_category": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "unspecified",
                                              "initial_acquisition",
                                              "business_expansion",
                                              "owner_buyout",
                                              "esop_or_cooperative"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "transaction_category_source": {
                                        "type": "string",
                                        "enum": [
                                          "supplied",
                                          "sop81_initial_acquisition_default",
                                          "not_applicable"
                                        ]
                                      },
                                      "business_purchase_price": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "flags": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "pattern": "^[a-z][a-z0-9_]{0,99}$",
                                              "maxLength": 100
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "present",
                                                "missing",
                                                "review"
                                              ]
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "status",
                                            "message"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "sba_program",
                                      "policy_reference",
                                      "policy_status",
                                      "transaction_category",
                                      "transaction_category_source",
                                      "business_purchase_price",
                                      "flags"
                                    ]
                                  },
                                  "financial_reconciliation": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period_end": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "selected_period_type": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "annual",
                                              "ltm",
                                              "interim"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "annual_revenue": {
                                        "oneOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sde": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "ebitda": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "top_level_reconciliation": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "sde": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          },
                                          "ebitda": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "sde",
                                          "ebitda"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "selected_period_end",
                                      "selected_period_type",
                                      "annual_revenue",
                                      "sde",
                                      "ebitda",
                                      "top_level_reconciliation"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "included"
                                          },
                                          "ownership_fraction": {
                                            "type": "number",
                                            "exclusiveMinimum": 0,
                                            "maximum": 1
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "embedded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "excluded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "scope",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "financial_reconciliation",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            },
                            "benchmark_release": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "family": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "version": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "snapshot_id": {
                                  "type": "string",
                                  "pattern": "^bm_[0-9a-f]{16}$"
                                }
                              },
                              "required": [
                                "family",
                                "version",
                                "snapshot_id"
                              ],
                              "x-smb-must-match": "$.benchmark_snapshot_id"
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "scope",
                            "benchmark_snapshot_id",
                            "benchmark_release",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        }
                      ],
                      "x-smb-public-contract": "smb.api.valuation.response.v8",
                      "x-smb-value-contract": "smb.value.result.v2",
                      "x-smb-full-receipt-contract": "smb.value.receipt.v1",
                      "x-smb-traceability": "valuation_id, benchmark_snapshot_id, model_release, and result_hash identify the public result. result_hash covers the deterministic canonical JSON public projection after API-owned question IDs are added, excluding result_hash itself; the complete Value receipt and workpapers remain private.",
                      "x-smb-proprietary-boundary": {
                        "public": "Rounded conclusions and ranges, broad methodology rationale, rounded alternatives, bounded portfolio scope, enum-only material input and assumption provenance, value-free data_used and data_not_used field paths, evidence and assumption support counts, benchmark release and fallback lineage, normalized financial reconciliation, material gaps, next questions, lending readiness, and integrity identifiers.",
                        "retained": "Exact multiples, priors, formulas, weights, scores, thresholds, raw benchmark cells, donor logic, simulation seeds and distributions, source names and references, exclusion reasons, internal method workpapers, and the complete receipt.",
                        "enforcement": "REST and MCP return the same exact object and reject unknown or additional upstream fields."
                      },
                      "x-smb-response-safeguards": {
                        "response_detail": "summary",
                        "maximum_buffered_value_response_bytes": 8000000,
                        "item_count_limit": null,
                        "enforcement": "The API rejects projected synchronous summaries above the response budget before Value execution, requests smb.value.result.v2, deeply validates its exact public-safe shape, returns each item once, and retains the bounded response reader as a fail-closed backstop.",
                        "maximum_projected_value_response_bytes": 8000000
                      },
                      "x-smb-persistence": "not_implemented",
                      "x-smb-model-release-boundary": {
                        "legacy": "smb.value.engine.v1.17.x",
                        "current": "smb.value.engine.v1.23.0 and later",
                        "discriminator": "model_release"
                      },
                      "x-smb-cross-field-invariants": [
                        "Every range requires low <= high.",
                        "item_count must equal results.length.",
                        "benchmark_release.snapshot_id must equal benchmark_snapshot_id for v1.23 and later.",
                        "portfolio.scope must reconcile exactly to results[].scope for v1.23 and later.",
                        "input_provenance must reconcile to input_support without exposing free-text evidence details.",
                        "For v1.23 and later, data_used and data_not_used are sorted, disjoint, value-free, and together account for submitted valuation data; material conflicts appear in next_questions."
                      ],
                      "x-smb-next-question-semantics": "Next questions are advisory. Modern Value responses return up to 32 ranked, deduplicated actionable questions per portfolio or item so an agent can collect material facts in one conversation. A UI may show a smaller top subset. For an unpersisted run, an agent should collect or confirm useful answers at the listed answer_paths and make a second explicit run_valuation call only when the caller asks for a revised valuation. For a persisted Workspace valuation, REST callers submit a question_id and value to POST /v1/valuations/{valuation_id}/answers; the server applies the first stored answer_path, creates a linked successor, and never mutates the source valuation."
                    }
                  },
                  "required": [
                    "business_id",
                    "intake_id",
                    "status",
                    "idempotent_replay",
                    "valuation_id",
                    "result"
                  ],
                  "x-smb-persistence-order": "The intake is attached to the authorized Business and normalized input is committed before compute; the validated public result is committed after compute.",
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "$id": "https://api.smb.co/v1/schemas/operations/create_valuation_intake/response",
                  "title": "Create a valuation intake response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Existing canonical Business to receive this valuation intake. Current Edit access is required."
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "default": "api",
                    "description": "Bounded attribution for the intake source."
                  },
                  "business": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "pattern": "\\S"
                      },
                      "website": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                      },
                      "address": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "formatted": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "street": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "city": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "state": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "postal_code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 32
                          },
                          "country": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 80
                          },
                          "lat": {
                            "type": "number",
                            "minimum": -90,
                            "maximum": 90
                          },
                          "lon": {
                            "type": "number",
                            "minimum": -180,
                            "maximum": 180
                          }
                        }
                      }
                    },
                    "required": [
                      "name"
                    ]
                  },
                  "contact": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 254
                      },
                      "relationship": {
                        "type": "string",
                        "enum": [
                          "owner",
                          "employee",
                          "advisor",
                          "potential_buyer",
                          "other"
                        ]
                      },
                      "relationship_other": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "\\S"
                      },
                      "consent_to_store": {
                        "const": true
                      },
                      "consent_version": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80,
                        "pattern": "\\S"
                      }
                    },
                    "required": [
                      "email",
                      "relationship",
                      "consent_to_store",
                      "consent_version"
                    ],
                    "allOf": [
                      {
                        "if": {
                          "properties": {
                            "relationship": {
                              "const": "other"
                            }
                          }
                        },
                        "then": {
                          "required": [
                            "relationship_other"
                          ]
                        },
                        "else": {
                          "not": {
                            "required": [
                              "relationship_other"
                            ]
                          }
                        }
                      }
                    ]
                  },
                  "valuation_input": {
                    "type": "object",
                    "properties": {
                      "valuation_date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "currency": {
                        "default": "USD",
                        "type": "string",
                        "enum": [
                          "USD"
                        ],
                        "description": "Value v1.16 currently accepts USD only. Other currencies must be converted before valuation."
                      },
                      "reference": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "Optional caller-defined label returned as reference so the result can be matched to the caller's workflow."
                      },
                      "valuation_context": {
                        "default": {
                          "purpose": "screening",
                          "standard": "unspecified",
                          "premise": "going_concern",
                          "transaction_type": "unspecified",
                          "ownership_basis": "unspecified"
                        },
                        "type": "object",
                        "properties": {
                          "purpose": {
                            "default": "screening",
                            "type": "string",
                            "enum": [
                              "screening",
                              "sale_or_purchase",
                              "lending",
                              "financial_reporting",
                              "tax",
                              "litigation",
                              "internal_planning",
                              "other"
                            ]
                          },
                          "standard": {
                            "default": "unspecified",
                            "type": "string",
                            "enum": [
                              "unspecified",
                              "fair_market_value",
                              "investment_value",
                              "fair_value",
                              "liquidation_value",
                              "other"
                            ]
                          },
                          "premise": {
                            "default": "going_concern",
                            "type": "string",
                            "enum": [
                              "going_concern",
                              "orderly_liquidation",
                              "forced_liquidation"
                            ]
                          },
                          "transaction_type": {
                            "default": "unspecified",
                            "type": "string",
                            "enum": [
                              "unspecified",
                              "asset_sale",
                              "equity_sale"
                            ]
                          },
                          "ownership_basis": {
                            "default": "unspecified",
                            "type": "string",
                            "enum": [
                              "unspecified",
                              "controlling",
                              "minority"
                            ]
                          },
                          "lending_context": {
                            "type": "object",
                            "properties": {
                              "sba_loan_number_date": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "transaction_category": {
                                "default": "unspecified",
                                "type": "string",
                                "enum": [
                                  "unspecified",
                                  "initial_acquisition",
                                  "business_expansion",
                                  "owner_buyout",
                                  "esop_or_cooperative"
                                ]
                              },
                              "business_purchase_price": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "additional_equity_above_valuation": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "debt_service_coverage_ratio": {
                                "type": "number",
                                "minimum": 0
                              },
                              "amount_financed_excluding_appraised_real_estate_and_equipment": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "related_party_transaction": {
                                "type": "boolean"
                              },
                              "special_purpose_property": {
                                "type": "boolean"
                              },
                              "lender_requested_valuation": {
                                "type": "boolean"
                              },
                              "valuation_prepared_for_lender": {
                                "type": "boolean"
                              },
                              "valuation_scope_identifies_included_assets_and_assumed_debt": {
                                "type": "boolean"
                              },
                              "valuation_conclusion_signed": {
                                "type": "boolean"
                              },
                              "qualified_source_engaged": {
                                "type": "boolean"
                              },
                              "qualified_source_credential": {
                                "default": "unspecified",
                                "type": "string",
                                "enum": [
                                  "unspecified",
                                  "asa",
                                  "cba",
                                  "abv",
                                  "cva",
                                  "bca",
                                  "certified_general_real_property_appraiser",
                                  "other"
                                ]
                              },
                              "qualified_source_independent": {
                                "type": "boolean"
                              },
                              "seller_financials_verified_against_irs_transcripts": {
                                "type": "boolean"
                              },
                              "quality_of_earnings_obtained": {
                                "type": "boolean"
                              },
                              "quality_of_earnings_cash_proof_complete": {
                                "type": "boolean"
                              },
                              "quality_of_earnings_used_for_debt_service_coverage": {
                                "type": "boolean"
                              },
                              "sba_program": {
                                "type": "string",
                                "enum": [
                                  "7a",
                                  "504",
                                  "other_sba",
                                  "not_sba"
                                ]
                              },
                              "esop_transaction": {
                                "type": "boolean"
                              },
                              "erisa_valuation_obtained": {
                                "type": "boolean"
                              },
                              "erisa_valuation_independent": {
                                "type": "boolean"
                              },
                              "erisa_valuation_evidence_present": {
                                "type": "boolean"
                              },
                              "seller_financials_irs_reconciliation_status": {
                                "type": "string",
                                "enum": [
                                  "matched",
                                  "conflict",
                                  "not_available"
                                ]
                              },
                              "quality_of_earnings_financial_reconciliation_complete": {
                                "type": "boolean"
                              },
                              "purchase_agreement_price": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "owner_occupied_commercial_real_estate_appraised_value": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "business_acquisition_debt_amount": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "global_debt_service_coverage_ratio": {
                                "type": "number",
                                "minimum": 0
                              },
                              "land_equity_contributed": {
                                "type": "boolean"
                              },
                              "third_party_lender_owned_real_estate": {
                                "type": "boolean"
                              },
                              "seller_carryback_counts_as_borrower_contribution": {
                                "type": "boolean"
                              },
                              "lender_requires_real_estate_appraisal": {
                                "type": "boolean"
                              },
                              "fixed_asset_value": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              },
                              "fixed_asset_net_book_value": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 90071992547409.9
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false,
                        "description": "Optional purpose, standard, premise, transaction, ownership, and SBA lending context. Screening defaults apply when omitted."
                      },
                      "portfolio_adjustments": {
                        "default": [],
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "adjustment_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "operation": {
                              "type": "string",
                              "enum": [
                                "add",
                                "subtract"
                              ]
                            },
                            "amount": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 90071992547409.9
                            },
                            "provenance": {
                              "type": "object",
                              "properties": {
                                "source_type": {
                                  "type": "string",
                                  "enum": [
                                    "owner_input",
                                    "advisor_input",
                                    "lender_input",
                                    "user_scenario",
                                    "market_comparable",
                                    "appraisal",
                                    "public_dataset",
                                    "internal_benchmark",
                                    "model_policy",
                                    "financial_statement",
                                    "tax_return",
                                    "other"
                                  ]
                                },
                                "source_name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 160
                                },
                                "verification": {
                                  "type": "string",
                                  "enum": [
                                    "verified",
                                    "unverified",
                                    "modeled"
                                  ]
                                },
                                "observed_at": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "reference": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                "note": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                }
                              },
                              "required": [
                                "source_type",
                                "source_name",
                                "verification"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "adjustment_id",
                            "label",
                            "operation",
                            "amount",
                            "provenance"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Optional portfolio-level additions or deductions with provenance."
                      },
                      "items": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "business_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200,
                                  "description": "The public SMB Business ID to resolve using the caller-authorized Public or Workspace view."
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "details": {
                                  "default": {
                                    "cash_flow_basis": "unspecified",
                                    "projection_period_unit": "unspecified",
                                    "terminal_value_mode": "unspecified"
                                  },
                                  "type": "object",
                                  "properties": {
                                    "naics_code": {
                                      "type": "string",
                                      "pattern": "^\\d{6}$"
                                    },
                                    "employee_count": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 10000000
                                    },
                                    "owner_operated": {
                                      "type": "boolean"
                                    },
                                    "owner_labor": {
                                      "type": "object",
                                      "properties": {
                                        "post_transaction_treatment": {
                                          "type": "string",
                                          "enum": [
                                            "buyer_supplied",
                                            "hired_replacement",
                                            "existing_management",
                                            "unspecified"
                                          ]
                                        },
                                        "annual_replacement_compensation": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "replacement_compensation_reflected_in_ebitda": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "post_transaction_treatment"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "asset_intensive": {
                                      "type": "boolean"
                                    },
                                    "stable_earnings": {
                                      "type": "boolean"
                                    },
                                    "business_real_estate_earnings_basis": {
                                      "type": "string",
                                      "enum": [
                                        "not_applicable",
                                        "market_rent_reflected",
                                        "market_rent_normalized",
                                        "unresolved"
                                      ],
                                      "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
                                    },
                                    "annual_revenue": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "sde": {
                                      "type": "number",
                                      "minimum": -90071992547409.9,
                                      "maximum": 90071992547409.9
                                    },
                                    "ebitda": {
                                      "type": "number",
                                      "minimum": -90071992547409.9,
                                      "maximum": 90071992547409.9
                                    },
                                    "adjusted_assets": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "liabilities": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "net_operating_income": {
                                      "type": "number",
                                      "minimum": -90071992547409.9,
                                      "maximum": 90071992547409.9
                                    },
                                    "cash_flows": {
                                      "minItems": 1,
                                      "maxItems": 100,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "period": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 100
                                          },
                                          "amount": {
                                            "type": "number",
                                            "minimum": -90071992547409.9,
                                            "maximum": 90071992547409.9
                                          }
                                        },
                                        "required": [
                                          "period",
                                          "amount"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "cash_flow_basis": {
                                      "default": "unspecified",
                                      "type": "string",
                                      "enum": [
                                        "unspecified",
                                        "fcff",
                                        "fcfe"
                                      ]
                                    },
                                    "projection_period_unit": {
                                      "default": "unspecified",
                                      "type": "string",
                                      "enum": [
                                        "unspecified",
                                        "year",
                                        "quarter",
                                        "month"
                                      ]
                                    },
                                    "terminal_value_mode": {
                                      "default": "unspecified",
                                      "type": "string",
                                      "enum": [
                                        "unspecified",
                                        "finite_horizon",
                                        "gordon_growth"
                                      ]
                                    },
                                    "projected_revenue": {
                                      "minItems": 1,
                                      "maxItems": 100,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "period": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 100
                                          },
                                          "amount": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 90071992547409.9
                                          }
                                        },
                                        "required": [
                                          "period",
                                          "amount"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "financial_history": {
                                      "minItems": 1,
                                      "maxItems": 10,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "period_end": {
                                            "type": "string",
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                          },
                                          "period_type": {
                                            "type": "string",
                                            "enum": [
                                              "annual",
                                              "ltm",
                                              "interim"
                                            ]
                                          },
                                          "annual_revenue": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 90071992547409.9
                                          },
                                          "reported_sde": {
                                            "type": "number",
                                            "minimum": -90071992547409.9,
                                            "maximum": 90071992547409.9
                                          },
                                          "reported_ebitda": {
                                            "type": "number",
                                            "minimum": -90071992547409.9,
                                            "maximum": 90071992547409.9
                                          },
                                          "normalization_adjustments": {
                                            "default": [],
                                            "maxItems": 100,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "adjustment_id": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "label": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 240
                                                },
                                                "target_metric": {
                                                  "type": "string",
                                                  "enum": [
                                                    "sde",
                                                    "ebitda"
                                                  ]
                                                },
                                                "operation": {
                                                  "type": "string",
                                                  "enum": [
                                                    "add",
                                                    "subtract"
                                                  ]
                                                },
                                                "amount": {
                                                  "type": "number",
                                                  "minimum": 0,
                                                  "maximum": 90071992547409.9
                                                },
                                                "treatment": {
                                                  "type": "string",
                                                  "enum": [
                                                    "accepted",
                                                    "proposed",
                                                    "excluded"
                                                  ]
                                                },
                                                "category": {
                                                  "type": "string",
                                                  "enum": [
                                                    "owner_compensation",
                                                    "related_party",
                                                    "nonrecurring_expense",
                                                    "nonoperating_expense",
                                                    "nonrecurring_income",
                                                    "discretionary_expense",
                                                    "rent_normalization",
                                                    "payroll_normalization",
                                                    "other"
                                                  ]
                                                },
                                                "provenance": {
                                                  "type": "object",
                                                  "properties": {
                                                    "source_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "owner_input",
                                                        "advisor_input",
                                                        "lender_input",
                                                        "user_scenario",
                                                        "market_comparable",
                                                        "appraisal",
                                                        "public_dataset",
                                                        "internal_benchmark",
                                                        "model_policy",
                                                        "financial_statement",
                                                        "tax_return",
                                                        "other"
                                                      ]
                                                    },
                                                    "source_name": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 160
                                                    },
                                                    "verification": {
                                                      "type": "string",
                                                      "enum": [
                                                        "verified",
                                                        "unverified",
                                                        "modeled"
                                                      ]
                                                    },
                                                    "observed_at": {
                                                      "type": "string",
                                                      "format": "date",
                                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                                    },
                                                    "reference": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    "note": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "source_type",
                                                    "source_name",
                                                    "verification"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "adjustment_id",
                                                "label",
                                                "target_metric",
                                                "operation",
                                                "amount",
                                                "treatment",
                                                "category"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "period_end",
                                          "period_type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "capital_structure": {
                                      "type": "object",
                                      "properties": {
                                        "cash_and_equivalents": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "interest_bearing_debt": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "debt_like_items": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "nonoperating_assets": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "working_capital_adjustment": {
                                          "type": "object",
                                          "properties": {
                                            "operation": {
                                              "type": "string",
                                              "enum": [
                                                "add",
                                                "subtract"
                                              ]
                                            },
                                            "amount": {
                                              "type": "number",
                                              "minimum": 0,
                                              "maximum": 90071992547409.9
                                            }
                                          },
                                          "required": [
                                            "operation",
                                            "amount"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "replacement_cost": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "current_market_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "inventory_gross_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "completion_costs": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "selling_costs": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "disposal_costs": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "project_property_estimated_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "appraised_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "source_type": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input",
                                        "advisor_input",
                                        "lender_input",
                                        "user_scenario",
                                        "market_comparable",
                                        "appraisal",
                                        "public_dataset",
                                        "internal_benchmark",
                                        "model_policy",
                                        "financial_statement",
                                        "tax_return",
                                        "other"
                                      ]
                                    },
                                    "source_name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 160
                                    },
                                    "verification": {
                                      "type": "string",
                                      "enum": [
                                        "verified",
                                        "unverified",
                                        "modeled"
                                      ]
                                    },
                                    "observed_at": {
                                      "type": "string",
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                    },
                                    "reference": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    "note": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "source_type",
                                    "source_name",
                                    "verification"
                                  ],
                                  "additionalProperties": false
                                },
                                "evidence": {
                                  "default": [],
                                  "maxItems": 200,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "source_type": {
                                        "type": "string",
                                        "enum": [
                                          "owner_input",
                                          "advisor_input",
                                          "lender_input",
                                          "user_scenario",
                                          "market_comparable",
                                          "appraisal",
                                          "public_dataset",
                                          "internal_benchmark",
                                          "model_policy",
                                          "financial_statement",
                                          "tax_return",
                                          "other"
                                        ]
                                      },
                                      "source_name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 160
                                      },
                                      "verification": {
                                        "type": "string",
                                        "enum": [
                                          "verified",
                                          "unverified",
                                          "modeled"
                                        ]
                                      },
                                      "observed_at": {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      "reference": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "note": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "field": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "source_type",
                                      "source_name",
                                      "verification",
                                      "field"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "input_quality": {
                                  "type": "object",
                                  "properties": {
                                    "completeness_score": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 100
                                    },
                                    "verification": {
                                      "type": "string",
                                      "enum": [
                                        "verified",
                                        "unverified",
                                        "modeled"
                                      ]
                                    },
                                    "source_type": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input",
                                        "advisor_input",
                                        "lender_input",
                                        "user_scenario",
                                        "market_comparable",
                                        "appraisal",
                                        "public_dataset",
                                        "internal_benchmark",
                                        "model_policy",
                                        "financial_statement",
                                        "tax_return",
                                        "other"
                                      ]
                                    },
                                    "source_name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 160
                                    },
                                    "note": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "completeness_score",
                                    "verification",
                                    "source_type",
                                    "source_name"
                                  ],
                                  "additionalProperties": false
                                },
                                "assumptions": {
                                  "default": {},
                                  "type": "object",
                                  "properties": {
                                    "sde_multiple": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100
                                    },
                                    "ebitda_multiple": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100
                                    },
                                    "revenue_multiple": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100
                                    },
                                    "capitalization_rate": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1
                                    },
                                    "discount_rate": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1
                                    },
                                    "terminal_growth_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "royalty_rate": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1
                                    },
                                    "tax_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "total_obsolescence_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "recovery_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "market_comparables": {
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "comparable_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "adjusted_value": {
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "value_basis": {
                                        "type": "string",
                                        "enum": [
                                          "enterprise_value",
                                          "equity_value",
                                          "asset_value"
                                        ]
                                      },
                                      "weight": {
                                        "type": "number",
                                        "exclusiveMinimum": 0
                                      },
                                      "transaction_date": {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      "observed_value": {
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "denominator": {
                                        "type": "object",
                                        "properties": {
                                          "metric": {
                                            "type": "string",
                                            "enum": [
                                              "sde",
                                              "ebitda",
                                              "revenue",
                                              "net_operating_income",
                                              "other"
                                            ]
                                          },
                                          "value": {
                                            "type": "number",
                                            "exclusiveMinimum": 0
                                          },
                                          "period_end": {
                                            "type": "string",
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                          }
                                        },
                                        "required": [
                                          "metric",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "naics_code": {
                                        "type": "string",
                                        "pattern": "^\\d{6}$"
                                      },
                                      "geography": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 160
                                      },
                                      "inclusion_rationale": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "source": {
                                        "type": "object",
                                        "properties": {
                                          "source_type": {
                                            "type": "string",
                                            "enum": [
                                              "owner_input",
                                              "advisor_input",
                                              "lender_input",
                                              "user_scenario",
                                              "market_comparable",
                                              "appraisal",
                                              "public_dataset",
                                              "internal_benchmark",
                                              "model_policy",
                                              "financial_statement",
                                              "tax_return",
                                              "other"
                                            ]
                                          },
                                          "source_name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 160
                                          },
                                          "verification": {
                                            "type": "string",
                                            "enum": [
                                              "verified",
                                              "unverified",
                                              "modeled"
                                            ]
                                          },
                                          "observed_at": {
                                            "type": "string",
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                          },
                                          "reference": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          "note": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "source_type",
                                          "source_name",
                                          "verification"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "adjusted_value",
                                      "value_basis"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "portfolio_treatment": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "mode": {
                                          "type": "string",
                                          "const": "include"
                                        },
                                        "ownership_fraction": {
                                          "type": "number",
                                          "exclusiveMinimum": 0,
                                          "maximum": 1
                                        }
                                      },
                                      "required": [
                                        "mode",
                                        "ownership_fraction"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "mode": {
                                          "type": "string",
                                          "const": "embedded"
                                        },
                                        "in_asset_id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        }
                                      },
                                      "required": [
                                        "mode",
                                        "in_asset_id"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "mode": {
                                          "type": "string",
                                          "const": "exclude"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 300
                                        }
                                      },
                                      "required": [
                                        "mode",
                                        "reason"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "business_id"
                              ],
                              "additionalProperties": false,
                              "description": "An existing SMB Business reference. Optional facts supplement this valuation only and never overwrite the Business record."
                            },
                            {
                              "type": "object",
                              "properties": {
                                "asset_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "business",
                                        "commercial_real_estate",
                                        "brand",
                                        "customer_relationships",
                                        "intangible",
                                        "equipment",
                                        "inventory",
                                        "other"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "const": "auto"
                                    }
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "details": {
                                  "default": {
                                    "cash_flow_basis": "unspecified",
                                    "projection_period_unit": "unspecified",
                                    "terminal_value_mode": "unspecified"
                                  },
                                  "type": "object",
                                  "properties": {
                                    "naics_code": {
                                      "type": "string",
                                      "pattern": "^\\d{6}$"
                                    },
                                    "employee_count": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 10000000
                                    },
                                    "owner_operated": {
                                      "type": "boolean"
                                    },
                                    "owner_labor": {
                                      "type": "object",
                                      "properties": {
                                        "post_transaction_treatment": {
                                          "type": "string",
                                          "enum": [
                                            "buyer_supplied",
                                            "hired_replacement",
                                            "existing_management",
                                            "unspecified"
                                          ]
                                        },
                                        "annual_replacement_compensation": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "replacement_compensation_reflected_in_ebitda": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "post_transaction_treatment"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "asset_intensive": {
                                      "type": "boolean"
                                    },
                                    "stable_earnings": {
                                      "type": "boolean"
                                    },
                                    "business_real_estate_earnings_basis": {
                                      "type": "string",
                                      "enum": [
                                        "not_applicable",
                                        "market_rent_reflected",
                                        "market_rent_normalized",
                                        "unresolved"
                                      ],
                                      "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
                                    },
                                    "annual_revenue": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "sde": {
                                      "type": "number",
                                      "minimum": -90071992547409.9,
                                      "maximum": 90071992547409.9
                                    },
                                    "ebitda": {
                                      "type": "number",
                                      "minimum": -90071992547409.9,
                                      "maximum": 90071992547409.9
                                    },
                                    "adjusted_assets": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "liabilities": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "net_operating_income": {
                                      "type": "number",
                                      "minimum": -90071992547409.9,
                                      "maximum": 90071992547409.9
                                    },
                                    "cash_flows": {
                                      "minItems": 1,
                                      "maxItems": 100,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "period": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 100
                                          },
                                          "amount": {
                                            "type": "number",
                                            "minimum": -90071992547409.9,
                                            "maximum": 90071992547409.9
                                          }
                                        },
                                        "required": [
                                          "period",
                                          "amount"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "cash_flow_basis": {
                                      "default": "unspecified",
                                      "type": "string",
                                      "enum": [
                                        "unspecified",
                                        "fcff",
                                        "fcfe"
                                      ]
                                    },
                                    "projection_period_unit": {
                                      "default": "unspecified",
                                      "type": "string",
                                      "enum": [
                                        "unspecified",
                                        "year",
                                        "quarter",
                                        "month"
                                      ]
                                    },
                                    "terminal_value_mode": {
                                      "default": "unspecified",
                                      "type": "string",
                                      "enum": [
                                        "unspecified",
                                        "finite_horizon",
                                        "gordon_growth"
                                      ]
                                    },
                                    "projected_revenue": {
                                      "minItems": 1,
                                      "maxItems": 100,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "period": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 100
                                          },
                                          "amount": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 90071992547409.9
                                          }
                                        },
                                        "required": [
                                          "period",
                                          "amount"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "financial_history": {
                                      "minItems": 1,
                                      "maxItems": 10,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "period_end": {
                                            "type": "string",
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                          },
                                          "period_type": {
                                            "type": "string",
                                            "enum": [
                                              "annual",
                                              "ltm",
                                              "interim"
                                            ]
                                          },
                                          "annual_revenue": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 90071992547409.9
                                          },
                                          "reported_sde": {
                                            "type": "number",
                                            "minimum": -90071992547409.9,
                                            "maximum": 90071992547409.9
                                          },
                                          "reported_ebitda": {
                                            "type": "number",
                                            "minimum": -90071992547409.9,
                                            "maximum": 90071992547409.9
                                          },
                                          "normalization_adjustments": {
                                            "default": [],
                                            "maxItems": 100,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "adjustment_id": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "label": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 240
                                                },
                                                "target_metric": {
                                                  "type": "string",
                                                  "enum": [
                                                    "sde",
                                                    "ebitda"
                                                  ]
                                                },
                                                "operation": {
                                                  "type": "string",
                                                  "enum": [
                                                    "add",
                                                    "subtract"
                                                  ]
                                                },
                                                "amount": {
                                                  "type": "number",
                                                  "minimum": 0,
                                                  "maximum": 90071992547409.9
                                                },
                                                "treatment": {
                                                  "type": "string",
                                                  "enum": [
                                                    "accepted",
                                                    "proposed",
                                                    "excluded"
                                                  ]
                                                },
                                                "category": {
                                                  "type": "string",
                                                  "enum": [
                                                    "owner_compensation",
                                                    "related_party",
                                                    "nonrecurring_expense",
                                                    "nonoperating_expense",
                                                    "nonrecurring_income",
                                                    "discretionary_expense",
                                                    "rent_normalization",
                                                    "payroll_normalization",
                                                    "other"
                                                  ]
                                                },
                                                "provenance": {
                                                  "type": "object",
                                                  "properties": {
                                                    "source_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "owner_input",
                                                        "advisor_input",
                                                        "lender_input",
                                                        "user_scenario",
                                                        "market_comparable",
                                                        "appraisal",
                                                        "public_dataset",
                                                        "internal_benchmark",
                                                        "model_policy",
                                                        "financial_statement",
                                                        "tax_return",
                                                        "other"
                                                      ]
                                                    },
                                                    "source_name": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 160
                                                    },
                                                    "verification": {
                                                      "type": "string",
                                                      "enum": [
                                                        "verified",
                                                        "unverified",
                                                        "modeled"
                                                      ]
                                                    },
                                                    "observed_at": {
                                                      "type": "string",
                                                      "format": "date",
                                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                                    },
                                                    "reference": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    "note": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    }
                                                  },
                                                  "required": [
                                                    "source_type",
                                                    "source_name",
                                                    "verification"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "adjustment_id",
                                                "label",
                                                "target_metric",
                                                "operation",
                                                "amount",
                                                "treatment",
                                                "category"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "period_end",
                                          "period_type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "capital_structure": {
                                      "type": "object",
                                      "properties": {
                                        "cash_and_equivalents": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "interest_bearing_debt": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "debt_like_items": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "nonoperating_assets": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 90071992547409.9
                                        },
                                        "working_capital_adjustment": {
                                          "type": "object",
                                          "properties": {
                                            "operation": {
                                              "type": "string",
                                              "enum": [
                                                "add",
                                                "subtract"
                                              ]
                                            },
                                            "amount": {
                                              "type": "number",
                                              "minimum": 0,
                                              "maximum": 90071992547409.9
                                            }
                                          },
                                          "required": [
                                            "operation",
                                            "amount"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "replacement_cost": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "current_market_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "inventory_gross_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "completion_costs": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "selling_costs": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "disposal_costs": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "project_property_estimated_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    },
                                    "appraised_value": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 90071992547409.9
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "source_type": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input",
                                        "advisor_input",
                                        "lender_input",
                                        "user_scenario",
                                        "market_comparable",
                                        "appraisal",
                                        "public_dataset",
                                        "internal_benchmark",
                                        "model_policy",
                                        "financial_statement",
                                        "tax_return",
                                        "other"
                                      ]
                                    },
                                    "source_name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 160
                                    },
                                    "verification": {
                                      "type": "string",
                                      "enum": [
                                        "verified",
                                        "unverified",
                                        "modeled"
                                      ]
                                    },
                                    "observed_at": {
                                      "type": "string",
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                    },
                                    "reference": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    "note": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "source_type",
                                    "source_name",
                                    "verification"
                                  ],
                                  "additionalProperties": false
                                },
                                "evidence": {
                                  "default": [],
                                  "maxItems": 200,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "source_type": {
                                        "type": "string",
                                        "enum": [
                                          "owner_input",
                                          "advisor_input",
                                          "lender_input",
                                          "user_scenario",
                                          "market_comparable",
                                          "appraisal",
                                          "public_dataset",
                                          "internal_benchmark",
                                          "model_policy",
                                          "financial_statement",
                                          "tax_return",
                                          "other"
                                        ]
                                      },
                                      "source_name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 160
                                      },
                                      "verification": {
                                        "type": "string",
                                        "enum": [
                                          "verified",
                                          "unverified",
                                          "modeled"
                                        ]
                                      },
                                      "observed_at": {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      "reference": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "note": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "field": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "source_type",
                                      "source_name",
                                      "verification",
                                      "field"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "input_quality": {
                                  "type": "object",
                                  "properties": {
                                    "completeness_score": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 100
                                    },
                                    "verification": {
                                      "type": "string",
                                      "enum": [
                                        "verified",
                                        "unverified",
                                        "modeled"
                                      ]
                                    },
                                    "source_type": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input",
                                        "advisor_input",
                                        "lender_input",
                                        "user_scenario",
                                        "market_comparable",
                                        "appraisal",
                                        "public_dataset",
                                        "internal_benchmark",
                                        "model_policy",
                                        "financial_statement",
                                        "tax_return",
                                        "other"
                                      ]
                                    },
                                    "source_name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 160
                                    },
                                    "note": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "completeness_score",
                                    "verification",
                                    "source_type",
                                    "source_name"
                                  ],
                                  "additionalProperties": false
                                },
                                "assumptions": {
                                  "default": {},
                                  "type": "object",
                                  "properties": {
                                    "sde_multiple": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100
                                    },
                                    "ebitda_multiple": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100
                                    },
                                    "revenue_multiple": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100
                                    },
                                    "capitalization_rate": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1
                                    },
                                    "discount_rate": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1
                                    },
                                    "terminal_growth_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "royalty_rate": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1
                                    },
                                    "tax_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "total_obsolescence_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "recovery_rate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "market_comparables": {
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "comparable_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "adjusted_value": {
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "value_basis": {
                                        "type": "string",
                                        "enum": [
                                          "enterprise_value",
                                          "equity_value",
                                          "asset_value"
                                        ]
                                      },
                                      "weight": {
                                        "type": "number",
                                        "exclusiveMinimum": 0
                                      },
                                      "transaction_date": {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      "observed_value": {
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "denominator": {
                                        "type": "object",
                                        "properties": {
                                          "metric": {
                                            "type": "string",
                                            "enum": [
                                              "sde",
                                              "ebitda",
                                              "revenue",
                                              "net_operating_income",
                                              "other"
                                            ]
                                          },
                                          "value": {
                                            "type": "number",
                                            "exclusiveMinimum": 0
                                          },
                                          "period_end": {
                                            "type": "string",
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                          }
                                        },
                                        "required": [
                                          "metric",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "naics_code": {
                                        "type": "string",
                                        "pattern": "^\\d{6}$"
                                      },
                                      "geography": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 160
                                      },
                                      "inclusion_rationale": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "source": {
                                        "type": "object",
                                        "properties": {
                                          "source_type": {
                                            "type": "string",
                                            "enum": [
                                              "owner_input",
                                              "advisor_input",
                                              "lender_input",
                                              "user_scenario",
                                              "market_comparable",
                                              "appraisal",
                                              "public_dataset",
                                              "internal_benchmark",
                                              "model_policy",
                                              "financial_statement",
                                              "tax_return",
                                              "other"
                                            ]
                                          },
                                          "source_name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 160
                                          },
                                          "verification": {
                                            "type": "string",
                                            "enum": [
                                              "verified",
                                              "unverified",
                                              "modeled"
                                            ]
                                          },
                                          "observed_at": {
                                            "type": "string",
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                          },
                                          "reference": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          "note": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "source_type",
                                          "source_name",
                                          "verification"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "adjusted_value",
                                      "value_basis"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "portfolio_treatment": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "mode": {
                                          "type": "string",
                                          "const": "include"
                                        },
                                        "ownership_fraction": {
                                          "type": "number",
                                          "exclusiveMinimum": 0,
                                          "maximum": 1
                                        }
                                      },
                                      "required": [
                                        "mode",
                                        "ownership_fraction"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "mode": {
                                          "type": "string",
                                          "const": "embedded"
                                        },
                                        "in_asset_id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        }
                                      },
                                      "required": [
                                        "mode",
                                        "in_asset_id"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "mode": {
                                          "type": "string",
                                          "const": "exclude"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 300
                                        }
                                      },
                                      "required": [
                                        "mode",
                                        "reason"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false
                            }
                          ]
                        },
                        "description": "One or more businesses or assets to value. There is no fixed item-count limit. The encoded request must be no larger than 8 MiB and Value rejects normalized workloads above 15,000 structural work units. Use business_id for a Business SMB already knows; otherwise send type and whatever details are available."
                      },
                      "combine_as_portfolio": {
                        "type": "boolean",
                        "default": false,
                        "description": "Required as true when items contains more than one entry, confirming that the entries should be valued together as one portfolio."
                      }
                    },
                    "required": [
                      "items"
                    ],
                    "additionalProperties": false,
                    "description": "Identify an existing SMB Business or describe any business, real estate, equipment, brand, customer book, or mixed portfolio using only the facts available. SMB Value selects applicable methods and returns a compact result for every item plus a portfolio Bestimate, range, evidence support, missing information, and review flags.",
                    "x-smb-injected-schema-version": "smb.value.intake.v1",
                    "x-smb-value-engine-version": "smb.value.engine.v1.16.0",
                    "x-smb-request-safeguards": {
                      "maximum_request_bytes": 8388608,
                      "maximum_structural_work_units": 15000,
                      "maximum_sensitivity_iterations": 25000,
                      "item_count_limit": null,
                      "enforcement": "The API bounds the encoded request body. Value computes structural work after normalization and returns an explicit validation error when the workload ceiling is exceeded."
                    },
                    "examples": [
                      {
                        "reference": "owner-operated-hvac-business",
                        "valuation_context": {
                          "purpose": "sale_or_purchase",
                          "standard": "fair_market_value",
                          "premise": "going_concern",
                          "transaction_type": "asset_sale",
                          "ownership_basis": "controlling"
                        },
                        "items": [
                          {
                            "asset_id": "hvac-business",
                            "type": "business",
                            "name": "Sample HVAC Services",
                            "details": {
                              "naics_code": "238220",
                              "employee_count": 18,
                              "owner_operated": true,
                              "annual_revenue": 2800000,
                              "sde": 520000,
                              "ebitda": 410000,
                              "adjusted_assets": 310000,
                              "liabilities": 85000,
                              "stable_earnings": true,
                              "business_real_estate_earnings_basis": "not_applicable"
                            }
                          }
                        ]
                      },
                      {
                        "reference": "two-location-coffee-franchise",
                        "combine_as_portfolio": true,
                        "items": [
                          {
                            "asset_id": "coffee-unit-columbus",
                            "type": "business",
                            "name": "Sample Coffee - Columbus",
                            "details": {
                              "naics_code": "722515",
                              "employee_count": 12,
                              "annual_revenue": 1450000,
                              "sde": 255000,
                              "ebitda": 205000,
                              "business_real_estate_earnings_basis": "market_rent_reflected"
                            },
                            "portfolio_treatment": {
                              "mode": "include",
                              "ownership_fraction": 1
                            }
                          },
                          {
                            "asset_id": "coffee-cre-columbus",
                            "type": "commercial_real_estate",
                            "name": "Sample Coffee Property - Columbus",
                            "details": {
                              "net_operating_income": 112000
                            },
                            "portfolio_treatment": {
                              "mode": "include",
                              "ownership_fraction": 1
                            }
                          },
                          {
                            "asset_id": "coffee-unit-dayton",
                            "type": "business",
                            "name": "Sample Coffee - Dayton",
                            "details": {
                              "naics_code": "722515",
                              "employee_count": 10,
                              "annual_revenue": 1180000,
                              "sde": 202000,
                              "ebitda": 158000,
                              "business_real_estate_earnings_basis": "market_rent_reflected"
                            },
                            "portfolio_treatment": {
                              "mode": "include",
                              "ownership_fraction": 1
                            }
                          },
                          {
                            "asset_id": "coffee-cre-dayton",
                            "type": "commercial_real_estate",
                            "name": "Sample Coffee Property - Dayton",
                            "details": {
                              "net_operating_income": 94000
                            },
                            "portfolio_treatment": {
                              "mode": "include",
                              "ownership_fraction": 1
                            }
                          }
                        ]
                      }
                    ],
                    "x-smb-value-input-compatibility": {
                      "version": "smb.value.input-compatibility.v1",
                      "mode": "additive",
                      "source_schema_remains_pinned": true,
                      "fields": [
                        "valuation_context.lending_context.sba_program",
                        "valuation_context.lending_context.esop_transaction",
                        "valuation_context.lending_context.erisa_valuation_obtained",
                        "valuation_context.lending_context.erisa_valuation_independent",
                        "valuation_context.lending_context.erisa_valuation_evidence_present",
                        "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                        "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                        "valuation_context.lending_context.purchase_agreement_price",
                        "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                        "valuation_context.lending_context.business_acquisition_debt_amount",
                        "valuation_context.lending_context.global_debt_service_coverage_ratio",
                        "valuation_context.lending_context.land_equity_contributed",
                        "valuation_context.lending_context.third_party_lender_owned_real_estate",
                        "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                        "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                        "valuation_context.lending_context.fixed_asset_value",
                        "valuation_context.lending_context.fixed_asset_net_book_value",
                        "items[].details.project_property_estimated_value",
                        "items[].details.appraised_value"
                      ],
                      "applied_fields": [
                        "valuation_context.lending_context.sba_program",
                        "valuation_context.lending_context.esop_transaction",
                        "valuation_context.lending_context.erisa_valuation_obtained",
                        "valuation_context.lending_context.erisa_valuation_independent",
                        "valuation_context.lending_context.erisa_valuation_evidence_present",
                        "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                        "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                        "valuation_context.lending_context.purchase_agreement_price",
                        "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                        "valuation_context.lending_context.business_acquisition_debt_amount",
                        "valuation_context.lending_context.global_debt_service_coverage_ratio",
                        "valuation_context.lending_context.land_equity_contributed",
                        "valuation_context.lending_context.third_party_lender_owned_real_estate",
                        "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                        "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                        "valuation_context.lending_context.fixed_asset_value",
                        "valuation_context.lending_context.fixed_asset_net_book_value",
                        "items[].details.project_property_estimated_value",
                        "items[].details.appraised_value"
                      ],
                      "semantics": "These optional fields allow a later explicit run_valuation request to answer current Value next questions. They do not trigger an automatic rerun."
                    }
                  }
                },
                "required": [
                  "business_id",
                  "business",
                  "contact",
                  "valuation_input"
                ]
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/valuations": {
      "post": {
        "operationId": "run_valuation",
        "summary": "Run a valuation",
        "description": "Estimate what one business, asset, or portfolio is worth from the facts provided. The result includes persistence.status. When persistence completes, save the returned intake_id and one-time claim_token so the guest valuation can be attached to a Business after authentication. Idempotent replays intentionally omit the claim token.",
        "tags": [
          "Valuations"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.run_valuation.request/properties/headers/properties/idempotency_key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data; revision when applicable; action_receipt; pending_approvals[]; warnings[]; validation_errors[].",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.run_valuation.http_response"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "409": {
            "description": "revision_conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "422": {
            "description": "evidence_required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/smb.v0.operations.run_valuation.request/properties/body"
              }
            }
          }
        }
      }
    },
    "/v1/valuations/{valuation_id}": {
      "get": {
        "operationId": "get_valuation",
        "summary": "Get Valuation",
        "description": "Gets one completed valuation attached to an accessible Business, including safe persisted input, result, lineage, model, and refinement-answer snapshots.",
        "tags": [
          "Valuations"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_valuation.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "valuation_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_valuation.request/properties/path/properties/valuation_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "valuation_id": {
                          "type": "string",
                          "pattern": "^val_[0-9a-f]{32}$",
                          "description": "Stable valuation ID."
                        },
                        "intake_id": {
                          "type": "string",
                          "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable valuation intake ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "status": {
                          "type": "string",
                          "const": "completed"
                        },
                        "input_schema_version": {
                          "type": "string",
                          "minLength": 1
                        },
                        "input": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "result_schema_version": {
                          "type": "string",
                          "minLength": 1
                        },
                        "result": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "model": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "release": {
                              "type": "string",
                              "minLength": 1
                            },
                            "benchmark_snapshot_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "release",
                            "benchmark_snapshot_id"
                          ]
                        },
                        "lineage": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "predecessor_valuation_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "successor_valuation_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^val_[0-9a-f]{32}$",
                                "description": "Immediate successor valuation."
                              }
                            }
                          },
                          "required": [
                            "predecessor_valuation_id",
                            "successor_valuation_ids"
                          ]
                        },
                        "refinement_answers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "question_id": {
                                "type": "string",
                                "pattern": "^vquestion_[0-9a-f]{32}_(?:p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                "description": "Stable question ID from the predecessor valuation."
                              },
                              "question_scope": {
                                "type": "string",
                                "enum": [
                                  "item",
                                  "portfolio"
                                ]
                              },
                              "item_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 120
                              },
                              "question": {
                                "type": "object",
                                "additionalProperties": true
                              },
                              "answer_path": {
                                "type": "string",
                                "minLength": 1
                              },
                              "answer_value": {},
                              "selector": {
                                "type": "object",
                                "additionalProperties": true
                              },
                              "answered_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "question_id",
                              "question_scope",
                              "item_id",
                              "question",
                              "answer_path",
                              "answer_value",
                              "selector",
                              "answered_at"
                            ]
                          }
                        },
                        "timestamps": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "intake_created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "started_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "completed_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "available_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "intake_created_at",
                            "started_at",
                            "completed_at",
                            "available_at"
                          ]
                        }
                      },
                      "required": [
                        "valuation_id",
                        "intake_id",
                        "business_id",
                        "status",
                        "input_schema_version",
                        "input",
                        "result_schema_version",
                        "result",
                        "model",
                        "lineage",
                        "refinement_answers",
                        "timestamps"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/valuations/{valuation_id}/answers": {
      "post": {
        "operationId": "refine_valuation",
        "summary": "Answer valuation questions",
        "description": "Answers immutable questions from one saved valuation, reruns the model from its persisted input snapshot, and saves an exact successor valuation linked to the selected predecessor attempt.",
        "tags": [
          "Valuations"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.refine_valuation.request/properties/headers/properties/idempotency_key"
            }
          },
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.refine_valuation.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "valuation_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.refine_valuation.request/properties/path/properties/valuation_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "intake_id": {
                      "type": "string",
                      "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Saved successor intake."
                    },
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Stable SMB Business ID."
                    },
                    "status": {
                      "type": "string",
                      "const": "completed"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "supersedes_valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$",
                      "description": "Immediate predecessor valuation."
                    },
                    "valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$",
                      "description": "Saved successor valuation."
                    },
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v1\\.17\\.(?:0|[1-9][0-9]*)$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 5,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "rank",
                                      "question",
                                      "improves"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "policy_reference"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "input_fields_used": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "annual_revenue",
                                            "cash_flow",
                                            "cash_flows",
                                            "disposal_costs",
                                            "ebitda",
                                            "employee_count",
                                            "gross_asset_value",
                                            "net_operating_income",
                                            "replacement_cost",
                                            "royalty_base",
                                            "sde",
                                            "total_assets",
                                            "total_liabilities"
                                          ]
                                        }
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "input_fields_used",
                                      "benchmark_support"
                                    ]
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 5,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 5
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "rank",
                                        "question",
                                        "improves"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "policy_reference"
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "benchmark_snapshot_id",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v(?:1\\.(?:2[3-9]|[3-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)|(?:[2-9]|[1-9][0-9]+)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*))$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 32,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 32
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "question_id",
                                      "rank",
                                      "question",
                                      "improves",
                                      "why",
                                      "answer_paths"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "sba_program": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "7a",
                                            "504",
                                            "other_sba",
                                            "not_sba"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "program_missing",
                                        "program_not_applicable",
                                        "program_unsupported",
                                        "policy_date_missing",
                                        "current_reference"
                                      ]
                                    },
                                    "transaction_category": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "unspecified",
                                            "initial_acquisition",
                                            "business_expansion",
                                            "owner_buyout",
                                            "esop_or_cooperative"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "transaction_category_source": {
                                      "type": "string",
                                      "enum": [
                                        "supplied",
                                        "sop81_initial_acquisition_default",
                                        "not_applicable"
                                      ]
                                    },
                                    "business_purchase_price": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "flags": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "pattern": "^[\\s\\S]{1,120}:[a-z][a-z0-9_]{0,99}$",
                                            "maxLength": 221
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "present",
                                              "missing",
                                              "review"
                                            ]
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "status",
                                          "message"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "sba_program",
                                    "policy_reference",
                                    "policy_status",
                                    "transaction_category",
                                    "transaction_category_source",
                                    "business_purchase_price",
                                    "flags"
                                  ]
                                },
                                "scope": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "included_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "embedded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "excluded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "partial_ownership_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "included_items",
                                    "embedded_items",
                                    "excluded_items",
                                    "partial_ownership_items"
                                  ],
                                  "x-smb-invariant": "Counts must reconcile exactly to results[].scope; partial_ownership_items cannot exceed included_items."
                                }
                              },
                              "required": [
                                "status",
                                "scope",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "next_questions",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          },
                                          "naics": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "requested_code": {
                                                    "type": "string",
                                                    "pattern": "^[0-9]{6}$"
                                                  },
                                                  "selected_code": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "pattern": "^[0-9]{6}$"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "match": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_found",
                                                      "exact_six_digit",
                                                      "exact_six_digit_context_only"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "requested_code",
                                                  "selected_code",
                                                  "match"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "fallback_lineage": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_needed",
                                                      "inferred",
                                                      "no_safe_fallback",
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "donor_naics_codes": {
                                                    "type": "array",
                                                    "uniqueItems": true,
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^[0-9]{6}$"
                                                    }
                                                  },
                                                  "confidence": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "high",
                                                          "moderate",
                                                          "limited"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "permitted_use": {
                                                    "type": "string",
                                                    "enum": [
                                                      "missing_input_screening",
                                                      "context_only",
                                                      "withheld",
                                                      "not_applicable"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "outcome",
                                                  "donor_naics_codes",
                                                  "confidence",
                                                  "permitted_use"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families",
                                          "naics",
                                          "fallback_lineage"
                                        ]
                                      },
                                      "input_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "evidenced": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "verified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "unverified_or_modeled": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "undated": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stale": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "evidenced",
                                          "verified",
                                          "unverified_or_modeled",
                                          "undated",
                                          "stale"
                                        ]
                                      },
                                      "assumption_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "market_supported": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "caller_supplied": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "policy_default": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "market_supported",
                                          "caller_supplied",
                                          "policy_default"
                                        ]
                                      },
                                      "input_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "adjusted_assets",
                                                "annual_revenue",
                                                "capital_structure",
                                                "cash_flows",
                                                "completion_costs",
                                                "current_market_value",
                                                "disposal_costs",
                                                "ebitda",
                                                "employee_count",
                                                "financial_history",
                                                "inventory_gross_value",
                                                "liabilities",
                                                "net_operating_income",
                                                "owner_labor",
                                                "projected_revenue",
                                                "replacement_cost",
                                                "sde",
                                                "selling_costs"
                                              ]
                                            },
                                            "evidence_status": {
                                              "type": "string",
                                              "enum": [
                                                "missing",
                                                "current_verified_attestation",
                                                "undated_verified_attestation",
                                                "stale_verified_attestation",
                                                "future_dated",
                                                "unverified_or_modeled"
                                              ]
                                            },
                                            "source_types": {
                                              "type": "array",
                                              "uniqueItems": true,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "owner_input",
                                                  "advisor_input",
                                                  "lender_input",
                                                  "user_scenario",
                                                  "market_comparable",
                                                  "appraisal",
                                                  "public_dataset",
                                                  "internal_benchmark",
                                                  "model_policy",
                                                  "financial_statement",
                                                  "tax_return",
                                                  "other"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "evidence_status",
                                            "source_types"
                                          ]
                                        },
                                        "x-smb-invariant": "Fields are unique; length and evidence-status counts reconcile to input_support; source_types are sorted and empty exactly when evidence_status is missing."
                                      },
                                      "assumption_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "category": {
                                              "type": "string",
                                              "enum": [
                                                "asset_obsolescence",
                                                "asset_recovery",
                                                "capitalization_and_discounting",
                                                "growth",
                                                "intangible_economics",
                                                "market_comparables",
                                                "market_pricing",
                                                "tax"
                                              ]
                                            },
                                            "source_type": {
                                              "type": "string",
                                              "enum": [
                                                "owner_input",
                                                "advisor_input",
                                                "lender_input",
                                                "user_scenario",
                                                "market_comparable",
                                                "appraisal",
                                                "public_dataset",
                                                "internal_benchmark",
                                                "model_policy",
                                                "financial_statement",
                                                "tax_return",
                                                "other"
                                              ]
                                            },
                                            "verification": {
                                              "type": "string",
                                              "enum": [
                                                "request_attested_verified",
                                                "request_attested_unverified",
                                                "modeled"
                                              ]
                                            },
                                            "timing": {
                                              "type": "string",
                                              "enum": [
                                                "current",
                                                "undated",
                                                "stale",
                                                "future_dated"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "category",
                                            "source_type",
                                            "verification",
                                            "timing"
                                          ]
                                        }
                                      },
                                      "data_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "string",
                                          "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                          "maxLength": 500
                                        }
                                      },
                                      "data_not_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                              "maxLength": 500
                                            },
                                            "why": {
                                              "type": "string",
                                              "enum": [
                                                "This information did not affect this valuation.",
                                                "Value does not currently use this information."
                                              ]
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "why"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "data_used",
                                      "data_not_used",
                                      "input_support",
                                      "assumption_support",
                                      "input_provenance",
                                      "assumption_provenance",
                                      "benchmark_support"
                                    ],
                                    "x-smb-data-usage-invariant": "data_used and data_not_used are individually sorted, contain unique public field paths, never overlap, and never expose submitted values. Conflicts are explained through next_questions rather than a third input status."
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 32,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 32
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "question_id",
                                        "rank",
                                        "question",
                                        "improves",
                                        "why",
                                        "answer_paths"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "sba_program": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "7a",
                                              "504",
                                              "other_sba",
                                              "not_sba"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "program_missing",
                                          "program_not_applicable",
                                          "program_unsupported",
                                          "policy_date_missing",
                                          "current_reference"
                                        ]
                                      },
                                      "transaction_category": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "unspecified",
                                              "initial_acquisition",
                                              "business_expansion",
                                              "owner_buyout",
                                              "esop_or_cooperative"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "transaction_category_source": {
                                        "type": "string",
                                        "enum": [
                                          "supplied",
                                          "sop81_initial_acquisition_default",
                                          "not_applicable"
                                        ]
                                      },
                                      "business_purchase_price": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "flags": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "pattern": "^[a-z][a-z0-9_]{0,99}$",
                                              "maxLength": 100
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "present",
                                                "missing",
                                                "review"
                                              ]
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "status",
                                            "message"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "sba_program",
                                      "policy_reference",
                                      "policy_status",
                                      "transaction_category",
                                      "transaction_category_source",
                                      "business_purchase_price",
                                      "flags"
                                    ]
                                  },
                                  "financial_reconciliation": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period_end": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "selected_period_type": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "annual",
                                              "ltm",
                                              "interim"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "annual_revenue": {
                                        "oneOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sde": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "ebitda": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "top_level_reconciliation": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "sde": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          },
                                          "ebitda": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "sde",
                                          "ebitda"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "selected_period_end",
                                      "selected_period_type",
                                      "annual_revenue",
                                      "sde",
                                      "ebitda",
                                      "top_level_reconciliation"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "included"
                                          },
                                          "ownership_fraction": {
                                            "type": "number",
                                            "exclusiveMinimum": 0,
                                            "maximum": 1
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "embedded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "excluded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "scope",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "financial_reconciliation",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            },
                            "benchmark_release": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "family": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "version": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "snapshot_id": {
                                  "type": "string",
                                  "pattern": "^bm_[0-9a-f]{16}$"
                                }
                              },
                              "required": [
                                "family",
                                "version",
                                "snapshot_id"
                              ],
                              "x-smb-must-match": "$.benchmark_snapshot_id"
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "scope",
                            "benchmark_snapshot_id",
                            "benchmark_release",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        }
                      ],
                      "x-smb-public-contract": "smb.api.valuation.response.v8",
                      "x-smb-value-contract": "smb.value.result.v2",
                      "x-smb-full-receipt-contract": "smb.value.receipt.v1",
                      "x-smb-traceability": "valuation_id, benchmark_snapshot_id, model_release, and result_hash identify the public result. result_hash covers the deterministic canonical JSON public projection after API-owned question IDs are added, excluding result_hash itself; the complete Value receipt and workpapers remain private.",
                      "x-smb-proprietary-boundary": {
                        "public": "Rounded conclusions and ranges, broad methodology rationale, rounded alternatives, bounded portfolio scope, enum-only material input and assumption provenance, value-free data_used and data_not_used field paths, evidence and assumption support counts, benchmark release and fallback lineage, normalized financial reconciliation, material gaps, next questions, lending readiness, and integrity identifiers.",
                        "retained": "Exact multiples, priors, formulas, weights, scores, thresholds, raw benchmark cells, donor logic, simulation seeds and distributions, source names and references, exclusion reasons, internal method workpapers, and the complete receipt.",
                        "enforcement": "REST and MCP return the same exact object and reject unknown or additional upstream fields."
                      },
                      "x-smb-response-safeguards": {
                        "response_detail": "summary",
                        "maximum_buffered_value_response_bytes": 8000000,
                        "item_count_limit": null,
                        "enforcement": "The API rejects projected synchronous summaries above the response budget before Value execution, requests smb.value.result.v2, deeply validates its exact public-safe shape, returns each item once, and retains the bounded response reader as a fail-closed backstop.",
                        "maximum_projected_value_response_bytes": 8000000
                      },
                      "x-smb-persistence": "not_implemented",
                      "x-smb-model-release-boundary": {
                        "legacy": "smb.value.engine.v1.17.x",
                        "current": "smb.value.engine.v1.23.0 and later",
                        "discriminator": "model_release"
                      },
                      "x-smb-cross-field-invariants": [
                        "Every range requires low <= high.",
                        "item_count must equal results.length.",
                        "benchmark_release.snapshot_id must equal benchmark_snapshot_id for v1.23 and later.",
                        "portfolio.scope must reconcile exactly to results[].scope for v1.23 and later.",
                        "input_provenance must reconcile to input_support without exposing free-text evidence details.",
                        "For v1.23 and later, data_used and data_not_used are sorted, disjoint, value-free, and together account for submitted valuation data; material conflicts appear in next_questions."
                      ],
                      "x-smb-next-question-semantics": "Next questions are advisory. Modern Value responses return up to 32 ranked, deduplicated actionable questions per portfolio or item so an agent can collect material facts in one conversation. A UI may show a smaller top subset. For an unpersisted run, an agent should collect or confirm useful answers at the listed answer_paths and make a second explicit run_valuation call only when the caller asks for a revised valuation. For a persisted Workspace valuation, REST callers submit a question_id and value to POST /v1/valuations/{valuation_id}/answers; the server applies the first stored answer_path, creates a linked successor, and never mutates the source valuation."
                    }
                  },
                  "required": [
                    "intake_id",
                    "business_id",
                    "status",
                    "idempotent_replay",
                    "supersedes_valuation_id",
                    "valuation_id",
                    "result"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "intake_id": {
                      "type": "string",
                      "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Saved successor intake."
                    },
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Stable SMB Business ID."
                    },
                    "status": {
                      "type": "string",
                      "const": "completed"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "supersedes_valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$",
                      "description": "Immediate predecessor valuation."
                    },
                    "valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$",
                      "description": "Saved successor valuation."
                    },
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v1\\.17\\.(?:0|[1-9][0-9]*)$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 5,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "rank",
                                      "question",
                                      "improves"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "policy_reference"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "input_fields_used": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "annual_revenue",
                                            "cash_flow",
                                            "cash_flows",
                                            "disposal_costs",
                                            "ebitda",
                                            "employee_count",
                                            "gross_asset_value",
                                            "net_operating_income",
                                            "replacement_cost",
                                            "royalty_base",
                                            "sde",
                                            "total_assets",
                                            "total_liabilities"
                                          ]
                                        }
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "input_fields_used",
                                      "benchmark_support"
                                    ]
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 5,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 5
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "rank",
                                        "question",
                                        "improves"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "policy_reference"
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "benchmark_snapshot_id",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "schema_version": {
                              "const": "smb.value.result.v2"
                            },
                            "valuation_id": {
                              "type": "string",
                              "pattern": "^val_[0-9a-f]{32}$"
                            },
                            "model_release": {
                              "type": "string",
                              "pattern": "^smb\\.value\\.engine\\.v(?:1\\.(?:2[3-9]|[3-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)|(?:[2-9]|[1-9][0-9]+)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*))$",
                              "maxLength": 200
                            },
                            "valuation_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "reference": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scope": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "screening",
                                    "sale_or_purchase",
                                    "lending",
                                    "financial_reporting",
                                    "tax",
                                    "litigation",
                                    "internal_planning",
                                    "other"
                                  ]
                                },
                                "standard": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "fair_market_value",
                                    "investment_value",
                                    "fair_value",
                                    "liquidation_value",
                                    "other"
                                  ]
                                },
                                "premise": {
                                  "type": "string",
                                  "enum": [
                                    "going_concern",
                                    "orderly_liquidation",
                                    "forced_liquidation"
                                  ]
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "asset_sale",
                                    "equity_sale"
                                  ]
                                },
                                "ownership_basis": {
                                  "type": "string",
                                  "enum": [
                                    "unspecified",
                                    "controlling",
                                    "minority"
                                  ]
                                }
                              },
                              "required": [
                                "purpose",
                                "standard",
                                "premise",
                                "transaction_type",
                                "ownership_basis"
                              ]
                            },
                            "benchmark_snapshot_id": {
                              "type": "string",
                              "pattern": "^bm_[0-9a-f]{16}$"
                            },
                            "portfolio": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "valued",
                                    "incomplete"
                                  ]
                                },
                                "conclusion": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "amount": {
                                          "type": "number"
                                        },
                                        "currency": {
                                          "type": "string",
                                          "pattern": "^[A-Z]{3}$"
                                        },
                                        "range": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "x-smb-invariant": "low_lte_high",
                                              "properties": {
                                                "low": {
                                                  "type": "number"
                                                },
                                                "high": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "low",
                                                "high"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency",
                                        "range",
                                        "value_basis"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "evidence_strength": {
                                  "type": "string",
                                  "enum": [
                                    "insufficient",
                                    "limited",
                                    "supported",
                                    "strong"
                                  ]
                                },
                                "permitted_use": {
                                  "type": "string",
                                  "enum": [
                                    "withheld",
                                    "screening_only",
                                    "decision_support_with_review",
                                    "expert_review_candidate"
                                  ]
                                },
                                "analysis_maturity": {
                                  "type": "string",
                                  "enum": [
                                    "synthetic_screening",
                                    "screening"
                                  ]
                                },
                                "reconciliation_status": {
                                  "type": "string",
                                  "enum": [
                                    "not_available",
                                    "consistent",
                                    "divergent"
                                  ]
                                },
                                "material_gaps": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                      },
                                      "affected_items": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "affected_items",
                                      "message"
                                    ]
                                  }
                                },
                                "next_questions": {
                                  "type": "array",
                                  "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                                  "maxItems": 32,
                                  "items": {
                                    "type": "object",
                                    "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                    "additionalProperties": false,
                                    "properties": {
                                      "question_id": {
                                        "type": "string",
                                        "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                        "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                      },
                                      "rank": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 32
                                      },
                                      "question": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "improves": {
                                        "type": "string",
                                        "enum": [
                                          "subject_scope",
                                          "financial_normalization",
                                          "valuation_basis",
                                          "method_fit",
                                          "assumption_support",
                                          "risk"
                                        ]
                                      },
                                      "why": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "answer_paths": {
                                        "type": "array",
                                        "minItems": 1,
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "valuation_context.lending_context.sba_loan_number_date",
                                            "valuation_context.lending_context.qualified_source_engaged",
                                            "valuation_context.lending_context.qualified_source_credential",
                                            "valuation_context.lending_context.qualified_source_independent",
                                            "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                            "valuation_context.lending_context.lender_requested_valuation",
                                            "valuation_context.lending_context.valuation_prepared_for_lender",
                                            "valuation_context.transaction_type",
                                            "valuation_context.ownership_basis",
                                            "items[].type",
                                            "items[].description",
                                            "items[].portfolio_treatment",
                                            "items[].details.projection_period_unit",
                                            "items[].details.cash_flow_basis",
                                            "items[].details.owner_labor",
                                            "items[].details.sde",
                                            "items[].details.ebitda",
                                            "items[].details.financial_history",
                                            "items[].details.financial_history[].normalization_adjustments[].provenance",
                                            "items[].details.capital_structure",
                                            "items[].details.business_real_estate_earnings_basis",
                                            "items[].market_comparables",
                                            "portfolio_adjustments[].provenance",
                                            "valuation_context.lending_context.sba_program",
                                            "valuation_context.lending_context.transaction_category",
                                            "valuation_context.lending_context.esop_transaction",
                                            "valuation_context.lending_context.erisa_valuation_obtained",
                                            "valuation_context.lending_context.erisa_valuation_independent",
                                            "valuation_context.lending_context.erisa_valuation_evidence_present",
                                            "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                            "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                            "valuation_context.lending_context.purchase_agreement_price",
                                            "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                            "valuation_context.lending_context.business_purchase_price",
                                            "valuation_context.lending_context.business_acquisition_debt_amount",
                                            "valuation_context.lending_context.debt_service_coverage_ratio",
                                            "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                            "valuation_context.lending_context.land_equity_contributed",
                                            "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                            "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                            "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                            "valuation_context.lending_context.fixed_asset_value",
                                            "valuation_context.lending_context.fixed_asset_net_book_value",
                                            "items[].details.project_property_estimated_value",
                                            "items[].details.appraised_value",
                                            "items[].assumptions.capitalization_rate"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "question_id",
                                      "rank",
                                      "question",
                                      "improves",
                                      "why",
                                      "answer_paths"
                                    ]
                                  }
                                },
                                "lending_readiness": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "screening_ready",
                                        "needs_information"
                                      ]
                                    },
                                    "sba_program": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "7a",
                                            "504",
                                            "other_sba",
                                            "not_sba"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_reference": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "policy_status": {
                                      "type": "string",
                                      "enum": [
                                        "not_requested",
                                        "program_missing",
                                        "program_not_applicable",
                                        "program_unsupported",
                                        "policy_date_missing",
                                        "current_reference"
                                      ]
                                    },
                                    "transaction_category": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "unspecified",
                                            "initial_acquisition",
                                            "business_expansion",
                                            "owner_buyout",
                                            "esop_or_cooperative"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "transaction_category_source": {
                                      "type": "string",
                                      "enum": [
                                        "supplied",
                                        "sop81_initial_acquisition_default",
                                        "not_applicable"
                                      ]
                                    },
                                    "business_purchase_price": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "flags": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "pattern": "^[\\s\\S]{1,120}:[a-z][a-z0-9_]{0,99}$",
                                            "maxLength": 221
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "present",
                                              "missing",
                                              "review"
                                            ]
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "status",
                                          "message"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "sba_program",
                                    "policy_reference",
                                    "policy_status",
                                    "transaction_category",
                                    "transaction_category_source",
                                    "business_purchase_price",
                                    "flags"
                                  ]
                                },
                                "scope": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "included_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "embedded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "excluded_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "partial_ownership_items": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "included_items",
                                    "embedded_items",
                                    "excluded_items",
                                    "partial_ownership_items"
                                  ],
                                  "x-smb-invariant": "Counts must reconcile exactly to results[].scope; partial_ownership_items cannot exceed included_items."
                                }
                              },
                              "required": [
                                "status",
                                "scope",
                                "conclusion",
                                "evidence_strength",
                                "permitted_use",
                                "analysis_maturity",
                                "reconciliation_status",
                                "material_gaps",
                                "next_questions",
                                "lending_readiness"
                              ]
                            },
                            "results": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "item_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "business",
                                      "commercial_real_estate",
                                      "brand",
                                      "customer_relationships",
                                      "intangible",
                                      "equipment",
                                      "inventory",
                                      "other"
                                    ]
                                  },
                                  "name": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "valued",
                                      "abstained"
                                    ]
                                  },
                                  "conclusion": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "type": "number"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "range": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "x-smb-invariant": "low_lte_high",
                                                "properties": {
                                                  "low": {
                                                    "type": "number"
                                                  },
                                                  "high": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "low",
                                                  "high"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "value_basis": {
                                            "type": "string",
                                            "enum": [
                                              "asset_value",
                                              "enterprise_value",
                                              "equity_value",
                                              "mixed_transaction_value",
                                              "unspecified"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency",
                                          "range",
                                          "value_basis"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "primary_methodology": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          "family": {
                                            "type": "string",
                                            "enum": [
                                              "income",
                                              "market",
                                              "asset",
                                              "intangible_asset"
                                            ]
                                          },
                                          "rationale_codes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "caller_selected_method",
                                                "best_supported_method",
                                                "cash_flow_supported",
                                                "asset_evidence_supported",
                                                "market_evidence_supported",
                                                "revenue_screening_only",
                                                "asset_specific_method"
                                              ]
                                            }
                                          },
                                          "rationale": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "family",
                                          "rationale_codes",
                                          "rationale"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "alternatives": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "methodology": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "indicated_value": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "currency": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^[A-Z]{3}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "value_basis": {
                                          "type": "string",
                                          "enum": [
                                            "asset_value",
                                            "enterprise_value",
                                            "equity_value",
                                            "mixed_transaction_value",
                                            "unspecified"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "calculated",
                                            "abstained"
                                          ]
                                        },
                                        "warning_codes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "insufficient_inputs",
                                              "input_reconciliation_required",
                                              "future_dated_evidence_excluded",
                                              "stale_evidence",
                                              "provisional_assumption",
                                              "comparable_evidence_review",
                                              "nonpositive_economics",
                                              "method_review_required"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "methodology",
                                        "indicated_value",
                                        "currency",
                                        "value_basis",
                                        "status",
                                        "warning_codes"
                                      ]
                                    }
                                  },
                                  "method_comparison": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "methods_considered": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "reconciliation_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_available",
                                          "consistent",
                                          "divergent"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "methods_considered",
                                      "reconciliation_status"
                                    ]
                                  },
                                  "evidence_summary": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "evidence_strength": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient",
                                          "limited",
                                          "supported",
                                          "strong"
                                        ]
                                      },
                                      "permitted_use": {
                                        "type": "string",
                                        "enum": [
                                          "withheld",
                                          "screening_only",
                                          "decision_support_with_review",
                                          "expert_review_candidate"
                                        ]
                                      },
                                      "analysis_maturity": {
                                        "type": "string",
                                        "enum": [
                                          "synthetic_screening",
                                          "screening"
                                        ]
                                      },
                                      "financials_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "periods_supplied": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "earnings_trend": {
                                        "type": "string",
                                        "enum": [
                                          "insufficient_history",
                                          "improving",
                                          "declining",
                                          "mixed",
                                          "flat"
                                        ]
                                      },
                                      "benchmark_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "resolution": {
                                            "type": "string",
                                            "enum": [
                                              "not_applicable",
                                              "exact",
                                              "inferred",
                                              "withheld"
                                            ]
                                          },
                                          "evidence_class": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "observed",
                                                  "derived",
                                                  "modeled"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "as_of": {
                                            "oneOf": [
                                              {
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "geography": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "source_families": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "U.S. Census Bureau"
                                              ]
                                            }
                                          },
                                          "naics": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "requested_code": {
                                                    "type": "string",
                                                    "pattern": "^[0-9]{6}$"
                                                  },
                                                  "selected_code": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "pattern": "^[0-9]{6}$"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "match": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_found",
                                                      "exact_six_digit",
                                                      "exact_six_digit_context_only"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "requested_code",
                                                  "selected_code",
                                                  "match"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "fallback_lineage": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_needed",
                                                      "inferred",
                                                      "no_safe_fallback",
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "donor_naics_codes": {
                                                    "type": "array",
                                                    "uniqueItems": true,
                                                    "items": {
                                                      "type": "string",
                                                      "pattern": "^[0-9]{6}$"
                                                    }
                                                  },
                                                  "confidence": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "high",
                                                          "moderate",
                                                          "limited"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "permitted_use": {
                                                    "type": "string",
                                                    "enum": [
                                                      "missing_input_screening",
                                                      "context_only",
                                                      "withheld",
                                                      "not_applicable"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "outcome",
                                                  "donor_naics_codes",
                                                  "confidence",
                                                  "permitted_use"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "resolution",
                                          "evidence_class",
                                          "as_of",
                                          "geography",
                                          "source_families",
                                          "naics",
                                          "fallback_lineage"
                                        ]
                                      },
                                      "input_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "evidenced": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "verified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "unverified_or_modeled": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "undated": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stale": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "evidenced",
                                          "verified",
                                          "unverified_or_modeled",
                                          "undated",
                                          "stale"
                                        ]
                                      },
                                      "assumption_support": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "required": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "market_supported": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "caller_supplied": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "policy_default": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "required",
                                          "market_supported",
                                          "caller_supplied",
                                          "policy_default"
                                        ]
                                      },
                                      "input_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "adjusted_assets",
                                                "annual_revenue",
                                                "capital_structure",
                                                "cash_flows",
                                                "completion_costs",
                                                "current_market_value",
                                                "disposal_costs",
                                                "ebitda",
                                                "employee_count",
                                                "financial_history",
                                                "inventory_gross_value",
                                                "liabilities",
                                                "net_operating_income",
                                                "owner_labor",
                                                "projected_revenue",
                                                "replacement_cost",
                                                "sde",
                                                "selling_costs"
                                              ]
                                            },
                                            "evidence_status": {
                                              "type": "string",
                                              "enum": [
                                                "missing",
                                                "current_verified_attestation",
                                                "undated_verified_attestation",
                                                "stale_verified_attestation",
                                                "future_dated",
                                                "unverified_or_modeled"
                                              ]
                                            },
                                            "source_types": {
                                              "type": "array",
                                              "uniqueItems": true,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "owner_input",
                                                  "advisor_input",
                                                  "lender_input",
                                                  "user_scenario",
                                                  "market_comparable",
                                                  "appraisal",
                                                  "public_dataset",
                                                  "internal_benchmark",
                                                  "model_policy",
                                                  "financial_statement",
                                                  "tax_return",
                                                  "other"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "evidence_status",
                                            "source_types"
                                          ]
                                        },
                                        "x-smb-invariant": "Fields are unique; length and evidence-status counts reconcile to input_support; source_types are sorted and empty exactly when evidence_status is missing."
                                      },
                                      "assumption_provenance": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "category": {
                                              "type": "string",
                                              "enum": [
                                                "asset_obsolescence",
                                                "asset_recovery",
                                                "capitalization_and_discounting",
                                                "growth",
                                                "intangible_economics",
                                                "market_comparables",
                                                "market_pricing",
                                                "tax"
                                              ]
                                            },
                                            "source_type": {
                                              "type": "string",
                                              "enum": [
                                                "owner_input",
                                                "advisor_input",
                                                "lender_input",
                                                "user_scenario",
                                                "market_comparable",
                                                "appraisal",
                                                "public_dataset",
                                                "internal_benchmark",
                                                "model_policy",
                                                "financial_statement",
                                                "tax_return",
                                                "other"
                                              ]
                                            },
                                            "verification": {
                                              "type": "string",
                                              "enum": [
                                                "request_attested_verified",
                                                "request_attested_unverified",
                                                "modeled"
                                              ]
                                            },
                                            "timing": {
                                              "type": "string",
                                              "enum": [
                                                "current",
                                                "undated",
                                                "stale",
                                                "future_dated"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "category",
                                            "source_type",
                                            "verification",
                                            "timing"
                                          ]
                                        }
                                      },
                                      "data_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "string",
                                          "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                          "maxLength": 500
                                        }
                                      },
                                      "data_not_used": {
                                        "type": "array",
                                        "uniqueItems": true,
                                        "maxItems": 2048,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string",
                                              "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                              "maxLength": 500
                                            },
                                            "why": {
                                              "type": "string",
                                              "enum": [
                                                "This information did not affect this valuation.",
                                                "Value does not currently use this information."
                                              ]
                                            }
                                          },
                                          "required": [
                                            "field",
                                            "why"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "evidence_strength",
                                      "permitted_use",
                                      "analysis_maturity",
                                      "financials_status",
                                      "selected_period",
                                      "periods_supplied",
                                      "earnings_trend",
                                      "data_used",
                                      "data_not_used",
                                      "input_support",
                                      "assumption_support",
                                      "input_provenance",
                                      "assumption_provenance",
                                      "benchmark_support"
                                    ],
                                    "x-smb-data-usage-invariant": "data_used and data_not_used are individually sorted, contain unique public field paths, never overlap, and never expose submitted values. Conflicts are explained through next_questions rather than a third input status."
                                  },
                                  "uncertainty": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "range": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "x-smb-invariant": "low_lte_high",
                                            "properties": {
                                              "low": {
                                                "type": "number"
                                              },
                                              "high": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "low",
                                              "high"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "const": "modeled_sensitivity_range"
                                      },
                                      "driver_categories": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "operating_performance",
                                            "market_assumptions",
                                            "asset_economics",
                                            "valuation_assumptions"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "range",
                                      "label",
                                      "driver_categories"
                                    ]
                                  },
                                  "material_gaps": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ]
                                    }
                                  },
                                  "next_questions": {
                                    "type": "array",
                                    "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                                    "maxItems": 32,
                                    "items": {
                                      "type": "object",
                                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                                      "additionalProperties": false,
                                      "properties": {
                                        "question_id": {
                                          "type": "string",
                                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                                        },
                                        "rank": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 32
                                        },
                                        "question": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "improves": {
                                          "type": "string",
                                          "enum": [
                                            "subject_scope",
                                            "financial_normalization",
                                            "valuation_basis",
                                            "method_fit",
                                            "assumption_support",
                                            "risk"
                                          ]
                                        },
                                        "why": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        "answer_paths": {
                                          "type": "array",
                                          "minItems": 1,
                                          "uniqueItems": true,
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "valuation_context.lending_context.sba_loan_number_date",
                                              "valuation_context.lending_context.qualified_source_engaged",
                                              "valuation_context.lending_context.qualified_source_credential",
                                              "valuation_context.lending_context.qualified_source_independent",
                                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                              "valuation_context.lending_context.lender_requested_valuation",
                                              "valuation_context.lending_context.valuation_prepared_for_lender",
                                              "valuation_context.transaction_type",
                                              "valuation_context.ownership_basis",
                                              "items[].type",
                                              "items[].description",
                                              "items[].portfolio_treatment",
                                              "items[].details.projection_period_unit",
                                              "items[].details.cash_flow_basis",
                                              "items[].details.owner_labor",
                                              "items[].details.sde",
                                              "items[].details.ebitda",
                                              "items[].details.financial_history",
                                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                                              "items[].details.capital_structure",
                                              "items[].details.business_real_estate_earnings_basis",
                                              "items[].market_comparables",
                                              "portfolio_adjustments[].provenance",
                                              "valuation_context.lending_context.sba_program",
                                              "valuation_context.lending_context.transaction_category",
                                              "valuation_context.lending_context.esop_transaction",
                                              "valuation_context.lending_context.erisa_valuation_obtained",
                                              "valuation_context.lending_context.erisa_valuation_independent",
                                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                              "valuation_context.lending_context.purchase_agreement_price",
                                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                              "valuation_context.lending_context.business_purchase_price",
                                              "valuation_context.lending_context.business_acquisition_debt_amount",
                                              "valuation_context.lending_context.debt_service_coverage_ratio",
                                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                              "valuation_context.lending_context.land_equity_contributed",
                                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                              "valuation_context.lending_context.fixed_asset_value",
                                              "valuation_context.lending_context.fixed_asset_net_book_value",
                                              "items[].details.project_property_estimated_value",
                                              "items[].details.appraised_value",
                                              "items[].assumptions.capitalization_rate"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "question_id",
                                        "rank",
                                        "question",
                                        "improves",
                                        "why",
                                        "answer_paths"
                                      ]
                                    }
                                  },
                                  "lending_readiness": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "screening_ready",
                                          "needs_information"
                                        ]
                                      },
                                      "sba_program": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "7a",
                                              "504",
                                              "other_sba",
                                              "not_sba"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_reference": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "policy_status": {
                                        "type": "string",
                                        "enum": [
                                          "not_requested",
                                          "program_missing",
                                          "program_not_applicable",
                                          "program_unsupported",
                                          "policy_date_missing",
                                          "current_reference"
                                        ]
                                      },
                                      "transaction_category": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "unspecified",
                                              "initial_acquisition",
                                              "business_expansion",
                                              "owner_buyout",
                                              "esop_or_cooperative"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "transaction_category_source": {
                                        "type": "string",
                                        "enum": [
                                          "supplied",
                                          "sop81_initial_acquisition_default",
                                          "not_applicable"
                                        ]
                                      },
                                      "business_purchase_price": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "flags": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "pattern": "^[a-z][a-z0-9_]{0,99}$",
                                              "maxLength": 100
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "present",
                                                "missing",
                                                "review"
                                              ]
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "status",
                                            "message"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "sba_program",
                                      "policy_reference",
                                      "policy_status",
                                      "transaction_category",
                                      "transaction_category_source",
                                      "business_purchase_price",
                                      "flags"
                                    ]
                                  },
                                  "financial_reconciliation": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "not_provided",
                                          "normalized",
                                          "no_eligible_period"
                                        ]
                                      },
                                      "selected_period_end": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "date"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "selected_period_type": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "annual",
                                              "ltm",
                                              "interim"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "annual_revenue": {
                                        "oneOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sde": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "ebitda": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                              "reported": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "accepted_adjustments": {
                                                "type": "number"
                                              },
                                              "proposed_adjustments": {
                                                "type": "number"
                                              },
                                              "excluded_adjustments": {
                                                "type": "number"
                                              },
                                              "normalized": {
                                                "oneOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "reported",
                                              "accepted_adjustments",
                                              "proposed_adjustments",
                                              "excluded_adjustments",
                                              "normalized"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "top_level_reconciliation": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "sde": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          },
                                          "ebitda": {
                                            "type": "string",
                                            "enum": [
                                              "not_comparable",
                                              "reconciled",
                                              "conflict"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "sde",
                                          "ebitda"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "selected_period_end",
                                      "selected_period_type",
                                      "annual_revenue",
                                      "sde",
                                      "ebitda",
                                      "top_level_reconciliation"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "included"
                                          },
                                          "ownership_fraction": {
                                            "type": "number",
                                            "exclusiveMinimum": 0,
                                            "maximum": 1
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "embedded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                          "portfolio_treatment": {
                                            "const": "excluded"
                                          },
                                          "ownership_fraction": {
                                            "type": "null"
                                          },
                                          "parent_item_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "portfolio_treatment",
                                          "ownership_fraction",
                                          "parent_item_id"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "item_id",
                                  "type",
                                  "name",
                                  "status",
                                  "scope",
                                  "conclusion",
                                  "primary_methodology",
                                  "alternatives",
                                  "method_comparison",
                                  "evidence_summary",
                                  "financial_reconciliation",
                                  "uncertainty",
                                  "material_gaps",
                                  "next_questions",
                                  "lending_readiness"
                                ]
                              }
                            },
                            "item_count": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "limitations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "result_hash": {
                              "type": "string",
                              "pattern": "^sha256:[0-9a-f]{64}$",
                              "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
                            },
                            "benchmark_release": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "family": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "version": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "snapshot_id": {
                                  "type": "string",
                                  "pattern": "^bm_[0-9a-f]{16}$"
                                }
                              },
                              "required": [
                                "family",
                                "version",
                                "snapshot_id"
                              ],
                              "x-smb-must-match": "$.benchmark_snapshot_id"
                            }
                          },
                          "required": [
                            "schema_version",
                            "valuation_id",
                            "model_release",
                            "valuation_date",
                            "currency",
                            "reference",
                            "scope",
                            "benchmark_snapshot_id",
                            "benchmark_release",
                            "portfolio",
                            "results",
                            "item_count",
                            "limitations",
                            "result_hash"
                          ]
                        }
                      ],
                      "x-smb-public-contract": "smb.api.valuation.response.v8",
                      "x-smb-value-contract": "smb.value.result.v2",
                      "x-smb-full-receipt-contract": "smb.value.receipt.v1",
                      "x-smb-traceability": "valuation_id, benchmark_snapshot_id, model_release, and result_hash identify the public result. result_hash covers the deterministic canonical JSON public projection after API-owned question IDs are added, excluding result_hash itself; the complete Value receipt and workpapers remain private.",
                      "x-smb-proprietary-boundary": {
                        "public": "Rounded conclusions and ranges, broad methodology rationale, rounded alternatives, bounded portfolio scope, enum-only material input and assumption provenance, value-free data_used and data_not_used field paths, evidence and assumption support counts, benchmark release and fallback lineage, normalized financial reconciliation, material gaps, next questions, lending readiness, and integrity identifiers.",
                        "retained": "Exact multiples, priors, formulas, weights, scores, thresholds, raw benchmark cells, donor logic, simulation seeds and distributions, source names and references, exclusion reasons, internal method workpapers, and the complete receipt.",
                        "enforcement": "REST and MCP return the same exact object and reject unknown or additional upstream fields."
                      },
                      "x-smb-response-safeguards": {
                        "response_detail": "summary",
                        "maximum_buffered_value_response_bytes": 8000000,
                        "item_count_limit": null,
                        "enforcement": "The API rejects projected synchronous summaries above the response budget before Value execution, requests smb.value.result.v2, deeply validates its exact public-safe shape, returns each item once, and retains the bounded response reader as a fail-closed backstop.",
                        "maximum_projected_value_response_bytes": 8000000
                      },
                      "x-smb-persistence": "not_implemented",
                      "x-smb-model-release-boundary": {
                        "legacy": "smb.value.engine.v1.17.x",
                        "current": "smb.value.engine.v1.23.0 and later",
                        "discriminator": "model_release"
                      },
                      "x-smb-cross-field-invariants": [
                        "Every range requires low <= high.",
                        "item_count must equal results.length.",
                        "benchmark_release.snapshot_id must equal benchmark_snapshot_id for v1.23 and later.",
                        "portfolio.scope must reconcile exactly to results[].scope for v1.23 and later.",
                        "input_provenance must reconcile to input_support without exposing free-text evidence details.",
                        "For v1.23 and later, data_used and data_not_used are sorted, disjoint, value-free, and together account for submitted valuation data; material conflicts appear in next_questions."
                      ],
                      "x-smb-next-question-semantics": "Next questions are advisory. Modern Value responses return up to 32 ranked, deduplicated actionable questions per portfolio or item so an agent can collect material facts in one conversation. A UI may show a smaller top subset. For an unpersisted run, an agent should collect or confirm useful answers at the listed answer_paths and make a second explicit run_valuation call only when the caller asks for a revised valuation. For a persisted Workspace valuation, REST callers submit a question_id and value to POST /v1/valuations/{valuation_id}/answers; the server applies the first stored answer_path, creates a linked successor, and never mutates the source valuation."
                    }
                  },
                  "required": [
                    "intake_id",
                    "business_id",
                    "status",
                    "idempotent_replay",
                    "supersedes_valuation_id",
                    "valuation_id",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "answers": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 64,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "question_id": {
                          "type": "string",
                          "pattern": "^vquestion_[0-9a-f]{32}_(?:p|i[1-9][0-9]*)_[1-9][0-9]*$",
                          "description": "Stable question ID from the prior valuation result."
                        },
                        "value": {},
                        "selector": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "item_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "period_end": {
                              "type": "string",
                              "format": "date"
                            },
                            "period_type": {
                              "type": "string",
                              "enum": [
                                "annual",
                                "ltm",
                                "interim"
                              ]
                            },
                            "adjustment_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            }
                          }
                        }
                      },
                      "required": [
                        "question_id",
                        "value"
                      ]
                    }
                  }
                },
                "required": [
                  "business_id",
                  "answers"
                ]
              }
            }
          }
        },
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/workspaces": {
      "post": {
        "operationId": "create_workspace",
        "summary": "Create a Workspace",
        "description": "Creates an active team Workspace and owner membership atomically for the authenticated user. Reusing Idempotency-Key with the same name returns the original Workspace; reusing it with a different name is rejected.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.create_workspace.request/properties/headers/properties/idempotency_key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An identical request was replayed idempotently.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.create_workspace.response"
                }
              }
            }
          },
          "201": {
            "description": "The Workspace and owner membership were created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.create_workspace.response"
                }
              }
            }
          },
          "400": {
            "description": "The body or Idempotency-Key is invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "401": {
            "description": "A valid non-anonymous user bearer token is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "403": {
            "description": "Workspace API keys cannot create a Workspace.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "409": {
            "description": "The Idempotency-Key was already used with a different Workspace name.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "429": {
            "description": "The authenticated user is rate limited.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "503": {
            "description": "Workspace creation is temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/smb.v0.operations.create_workspace.request/properties/body"
              }
            }
          }
        },
        "security": [
          {
            "userBearer": []
          }
        ],
        "x-smb-bootstrap": true
      }
    },
    "/v1/workspaces/{workspace_id}": {
      "get": {
        "operationId": "get_workspace",
        "summary": "Get Workspace",
        "description": "Returns one Workspace and its permitted collaboration metadata.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_workspace.request/properties/path/properties/workspace_id"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_workspace.request/properties/query/properties/as_of"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_workspace.request/properties/query/properties/expand"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_workspace.request/properties/query/properties/fields"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_workspace.request/properties/query/properties/id"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.get_workspace.request/properties/query/properties/revision"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data; projection; schema_version; revision; links; provenance when permitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.get_workspace.response"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "409": {
            "description": "revision_conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "422": {
            "description": "evidence_required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/businesses": {
      "get": {
        "operationId": "search_workspace_businesses",
        "summary": "List Workspace Businesses",
        "description": "Lists Businesses visible to the caller in one Workspace, including unpublished Businesses and bounded Workspace observations. Omit name to list all accessible Businesses, one page at a time, or supply name to filter them. Requires businesses:read; the Workspace in the path and SMB-Workspace-Id header must match. Pages default to 20 Businesses, with a maximum of 100. When page.has_more is true, pass page.cursor as cursor to get the next page.",
        "tags": [
          "Business data"
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.search_workspace_businesses.request/properties/headers/properties/workspace_id"
            }
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.search_workspace_businesses.request/properties/path/properties/workspace_id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.search_workspace_businesses.request/properties/query/properties/cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.search_workspace_businesses.request/properties/query/properties/limit"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/smb.v0.operations.search_workspace_businesses.request/properties/query/properties/name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data[]; page {cursor, has_more}; projection; schema_version; as_of; provenance when permitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.operations.search_workspace_businesses.response"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "409": {
            "description": "revision_conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "422": {
            "description": "evidence_required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/smb.v0.objects.error"
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace",
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ]
      }
    },
    "/v1/workspace/team/invitations": {
      "post": {
        "operationId": "invite_workspace_member",
        "summary": "Invite a Workspace member",
        "description": "Invites an email to the selected Workspace. Defaults to member; only owners grant admin. The recipient must accept; this does not add an active member. Requires explicit user intent. Paid seats require confirmation. Retries do not resend email.",
        "tags": [
          "Workspace Team"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "member",
                      "viewer",
                      "admin"
                    ],
                    "default": "member"
                  },
                  "expires_in_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90,
                    "default": 30
                  },
                  "confirm_paid_seat": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "invitation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "role": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "email_sent": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "invitation_id",
                        "role",
                        "status"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "operation": {
                          "type": "string"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "operation",
                        "command_id",
                        "actor_user_id"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "workspace_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "The plan member limit is reached or adding a paid seat requires confirmation. Billing context is included in error.details.billing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "plus_required",
                            "paid_seat_confirmation_required"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "billing": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "plan": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "name"
                                  ]
                                },
                                "memberLimit": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "planLimitReached": {
                                  "type": "boolean"
                                },
                                "requiresPaidSeatConfirmation": {
                                  "type": "boolean"
                                },
                                "product": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "unitAmount": {
                                  "type": "integer",
                                  "description": "Monthly seat price in cents."
                                },
                                "activeMembers": {
                                  "type": "integer"
                                },
                                "pendingInvites": {
                                  "type": "integer"
                                },
                                "nextSeatCount": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "plan",
                                "memberLimit",
                                "planLimitReached",
                                "requiresPaidSeatConfirmation",
                                "product",
                                "unitAmount",
                                "activeMembers",
                                "pendingInvites",
                                "nextSeatCount"
                              ]
                            }
                          },
                          "required": [
                            "billing"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "get": {
        "operationId": "list_workspace_invitations",
        "summary": "List pending Workspace invitations",
        "description": "Lists unexpired pending invitations in the selected Workspace. Requires team invite or manage permission. No invitation tokens are returned.",
        "tags": [
          "Workspace Team"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "invitation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "role": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email_sent": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "invitation_id",
                          "role",
                          "status"
                        ]
                      }
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "operation": {
                          "type": "string"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "operation",
                        "command_id",
                        "actor_user_id"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "workspace_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/workspace/team/members": {
      "get": {
        "operationId": "list_workspace_members",
        "summary": "List Workspace members",
        "description": "Lists a bounded page of active Workspace members and their user IDs for task assignment. Does not grant access to task resources.",
        "tags": [
          "Workspace Team"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email"
                          },
                          "member_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "role": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "member_id",
                          "user_id",
                          "role",
                          "display_name"
                        ]
                      }
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "operation": {
                          "type": "string"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "operation",
                        "command_id",
                        "actor_user_id"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "workspace_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/workspace/team/invitations/{invitation_id}/revoke": {
      "post": {
        "operationId": "revoke_workspace_invitation",
        "summary": "Revoke a Workspace invitation",
        "description": "Revokes a pending invitation with explicit user intent. Requires team manage permission; only owners can revoke admin invitations. Does not remove accepted members.",
        "tags": [
          "Workspace Team"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "invitation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "revoked"
                          ]
                        }
                      },
                      "required": [
                        "invitation_id",
                        "status"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "operation": {
                          "type": "string"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "operation",
                        "command_id",
                        "actor_user_id"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "workspace_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/activity": {
      "get": {
        "operationId": "list_room_activity",
        "summary": "List Room activity",
        "description": "Lists what happened in a Room, newest first: people joining, files added, viewed and downloaded, tools shared, SMB reading shared tools (what was read; the question only for whoever asked it), tasks and approvals. Full access sees everything; others see Room-wide events, their own activity and what's about them. Prefer list_events (room_id): the same events, with stable ids and the newer names.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "description": "next_cursor from the previous page.",
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only these kinds: room, member, file, tool, agent, task, approval.",
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "room",
                  "member",
                  "file",
                  "tool",
                  "agent",
                  "task",
                  "approval"
                ]
              }
            }
          },
          {
            "name": "actor_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only what this person did.",
              "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)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "activity_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)$"
                          },
                          "occurred_at": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "actor": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "system"
                                ]
                              },
                              "user_id": {
                                "anyOf": [
                                  {
                                    "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)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "user_id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "subject": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "user_id": {
                                    "anyOf": [
                                      {
                                        "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)$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "email": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "user_id",
                                  "email",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "target": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "room_file_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "task_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "connection_id": {
                            "anyOf": [
                              {
                                "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)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "approval_id": {
                            "anyOf": [
                              {
                                "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)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "detail": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "mine": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "room": {
                            "type": "object",
                            "properties": {
                              "room_id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "room_id",
                              "title"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "activity_id",
                          "occurred_at",
                          "type",
                          "actor",
                          "target",
                          "room_file_id",
                          "task_id",
                          "connection_id",
                          "approval_id",
                          "detail",
                          "mine"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-activity/mine": {
      "get": {
        "operationId": "list_my_room_activity",
        "summary": "List my activity in Rooms",
        "description": "Lists what the signed-in person did across the Rooms they can still open, newest first (30 days unless since is given). Prefer list_events with actor=me.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "description": "ISO date and time.",
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "activity_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)$"
                          },
                          "occurred_at": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "actor": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "system"
                                ]
                              },
                              "user_id": {
                                "anyOf": [
                                  {
                                    "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)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "user_id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "subject": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "user_id": {
                                    "anyOf": [
                                      {
                                        "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)$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "email": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "user_id",
                                  "email",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "target": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "room_file_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "task_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "connection_id": {
                            "anyOf": [
                              {
                                "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)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "approval_id": {
                            "anyOf": [
                              {
                                "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)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "detail": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "mine": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "room": {
                            "type": "object",
                            "properties": {
                              "room_id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "room_id",
                              "title"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "activity_id",
                          "occurred_at",
                          "type",
                          "actor",
                          "target",
                          "room_file_id",
                          "task_id",
                          "connection_id",
                          "approval_id",
                          "detail",
                          "mine"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections": {
      "get": {
        "operationId": "list_room_connections",
        "summary": "List Room connections",
        "description": "Lists apps and saved logins shared into a Room.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "connection_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)$"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "app",
                              "login"
                            ]
                          },
                          "plugin": {
                            "type": "string"
                          },
                          "origin": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "live",
                              "paused",
                              "disconnected"
                            ]
                          },
                          "shared_by": {
                            "type": "object",
                            "properties": {
                              "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)$"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "shared_at": {
                            "type": "string"
                          },
                          "mine": {
                            "type": "boolean"
                          },
                          "can_stop": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "connection_id",
                          "kind",
                          "plugin",
                          "origin",
                          "label",
                          "status",
                          "shared_by",
                          "shared_at",
                          "mine",
                          "can_stop"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "share_room_connection",
        "summary": "Share a connection into a Room",
        "description": "Shares one of the caller's own connected apps or saved logins into a Room they can open. Pass task_id to answer one of their open requests with it.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "connection_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)$"
                  },
                  "task_id": {
                    "type": "string",
                    "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  }
                },
                "required": [
                  "connection_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connection_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)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "app",
                            "login"
                          ]
                        },
                        "plugin": {
                          "type": "string"
                        },
                        "origin": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "paused",
                            "disconnected"
                          ]
                        },
                        "shared_by": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "shared_at": {
                          "type": "string"
                        },
                        "mine": {
                          "type": "boolean"
                        },
                        "can_stop": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "connection_id",
                        "kind",
                        "plugin",
                        "origin",
                        "label",
                        "status",
                        "shared_by",
                        "shared_at",
                        "mine",
                        "can_stop"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections/{connection_id}/stop": {
      "post": {
        "operationId": "stop_room_connection",
        "summary": "Stop sharing a connection",
        "description": "Stops sharing an app or saved login in a Room. The person who shared it or a Room manager can stop it. Access ends right away and nothing new starts; an approved action that already started finishes and records its result.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connection_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)$"
                        },
                        "stopped": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "connection_id",
                        "stopped"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections/{connection_id}/pause": {
      "post": {
        "operationId": "pause_room_connection",
        "summary": "Pause a shared connection",
        "description": "Pauses an app or saved login shared into a Room without stopping it. The person who shared it or a Room manager can pause it. Nobody can read it or ask for actions until it's resumed; asks already waiting for approval keep waiting (and still expire on time), and approving one waits for Resume.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connection_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)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "app",
                            "login"
                          ]
                        },
                        "plugin": {
                          "type": "string"
                        },
                        "origin": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "paused",
                            "disconnected"
                          ]
                        },
                        "shared_by": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "shared_at": {
                          "type": "string"
                        },
                        "mine": {
                          "type": "boolean"
                        },
                        "can_stop": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "connection_id",
                        "kind",
                        "plugin",
                        "origin",
                        "label",
                        "status",
                        "shared_by",
                        "shared_at",
                        "mine",
                        "can_stop"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections/{connection_id}/resume": {
      "post": {
        "operationId": "resume_room_connection",
        "summary": "Resume a paused connection",
        "description": "Resumes an app or saved login paused in a Room, so the Room can use it again. The person who shared it or a Room manager can resume it.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connection_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)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "app",
                            "login"
                          ]
                        },
                        "plugin": {
                          "type": "string"
                        },
                        "origin": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "paused",
                            "disconnected"
                          ]
                        },
                        "shared_by": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "shared_at": {
                          "type": "string"
                        },
                        "mine": {
                          "type": "boolean"
                        },
                        "can_stop": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "connection_id",
                        "kind",
                        "plugin",
                        "origin",
                        "label",
                        "status",
                        "shared_by",
                        "shared_at",
                        "mine",
                        "can_stop"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections/{connection_id}/tools": {
      "get": {
        "operationId": "find_room_connection_tools",
        "summary": "Find a shared app's tools",
        "description": "Finds an app's tools for a task. Read-only ones run with read_room_connection; others need request_room_approval.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connection_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)$"
                        },
                        "plugin": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "input_schema": {},
                              "read_only": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "tool",
                              "name",
                              "description",
                              "input_schema",
                              "read_only"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "connection_id",
                        "plugin",
                        "label",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections/{connection_id}/read": {
      "post": {
        "operationId": "read_room_connection",
        "summary": "Read from a shared app",
        "description": "Runs one read-only tool on an app shared into a Room. Never changes anything. Each read is recorded in the Room's activity: everyone in the Room sees which app and what kind of read; the question is shown only to the person who asked it.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "tool": {
                    "description": "Tool slug from find_room_connection_tools.",
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{1,127}$"
                  },
                  "arguments": {
                    "description": "Inputs per the tool's input_schema.",
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "question": {
                    "description": "The person's question, in their words. Shown in the Room's activity only to the person who asked it.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "tool"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "tool": {
                          "type": "string"
                        },
                        "result": {}
                      },
                      "required": [
                        "tool",
                        "result"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/connections/{connection_id}/approvals": {
      "post": {
        "operationId": "request_room_approval",
        "summary": "Ask for approval",
        "description": "Asks the app's owner to approve one action. Nothing runs until they approve; then it runs once, exactly as asked.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "tool": {
                    "description": "Tool slug from find_room_connection_tools.",
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{1,127}$"
                  },
                  "arguments": {
                    "description": "Inputs per the tool's input_schema.",
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "summary": {
                    "description": "What will happen, in plain words.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "tool",
                  "summary"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "approval_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)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "app_action"
                          ]
                        },
                        "room_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connection_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)$"
                        },
                        "plugin": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tool": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "summary": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "done",
                            "failed",
                            "unconfirmed",
                            "declined",
                            "expired",
                            "canceled"
                          ]
                        },
                        "requested_by": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "approver": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "task_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string"
                        },
                        "decided_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "finished_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "result": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "approval_id",
                        "kind",
                        "room_id",
                        "connection_id",
                        "plugin",
                        "tool",
                        "arguments",
                        "summary",
                        "status",
                        "requested_by",
                        "approver",
                        "task_id",
                        "created_at",
                        "expires_at",
                        "decided_at",
                        "finished_at",
                        "result",
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/approvals/{approval_id}": {
      "get": {
        "operationId": "get_room_approval",
        "summary": "Get an approval",
        "description": "Gets an approval's status, and its result once it ran.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "approval_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "approval_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)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "app_action"
                          ]
                        },
                        "room_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connection_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)$"
                        },
                        "plugin": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tool": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "summary": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "done",
                            "failed",
                            "unconfirmed",
                            "declined",
                            "expired",
                            "canceled"
                          ]
                        },
                        "requested_by": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "approver": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "task_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string"
                        },
                        "decided_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "finished_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "result": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "approval_id",
                        "kind",
                        "room_id",
                        "connection_id",
                        "plugin",
                        "tool",
                        "arguments",
                        "summary",
                        "status",
                        "requested_by",
                        "approver",
                        "task_id",
                        "created_at",
                        "expires_at",
                        "decided_at",
                        "finished_at",
                        "result",
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/approvals/{approval_id}/decision": {
      "post": {
        "operationId": "decide_room_approval",
        "summary": "Approve or decline",
        "description": "The owner approves or declines an approval asked of them. Approving runs it once, exactly as asked.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "approval_id",
            "in": "path",
            "required": true,
            "schema": {
              "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)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "decline"
                    ]
                  }
                },
                "required": [
                  "decision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "approval_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)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "app_action"
                          ]
                        },
                        "room_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connection_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)$"
                        },
                        "plugin": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tool": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "summary": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "done",
                            "failed",
                            "unconfirmed",
                            "declined",
                            "expired",
                            "canceled"
                          ]
                        },
                        "requested_by": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "approver": {
                          "type": "object",
                          "properties": {
                            "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)$"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "task_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string"
                        },
                        "decided_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "finished_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "result": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "approval_id",
                        "kind",
                        "room_id",
                        "connection_id",
                        "plugin",
                        "tool",
                        "arguments",
                        "summary",
                        "status",
                        "requested_by",
                        "approver",
                        "task_id",
                        "created_at",
                        "expires_at",
                        "decided_at",
                        "finished_at",
                        "result",
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "list_events",
        "summary": "List events",
        "description": "Lists what happened, newest first, in one Room (room_id), about one business (business_id), or across all your Rooms. Each event says who did it, through which app (SMB, Claude, ChatGPT, an API key), and what about. Same visibility as each Room's Activity. Filter by types, actor (me or a user id), or about=me.",
        "tags": [
          "Events"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only this Room.",
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "business_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only events about this business.",
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "actor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only what this person did: me, or their user id.",
              "anyOf": [
                {
                  "type": "string",
                  "const": "me"
                },
                {
                  "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)$"
                }
              ]
            }
          },
          {
            "name": "about",
            "in": "query",
            "required": false,
            "schema": {
              "description": "me: tasks given to you, approvals asked of you, your shared apps read.",
              "type": "string",
              "const": "me"
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Types (file.version_added) or kinds (file.*), comma-separated.",
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "description": "ISO date and time: only events since then.",
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "description": "next_cursor from the previous page.",
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^evt_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                          },
                          "type": {
                            "type": "string"
                          },
                          "occurred_at": {
                            "type": "string"
                          },
                          "room": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "title"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "actor": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "person",
                                  "agent",
                                  "system"
                                ]
                              },
                              "user_id": {
                                "anyOf": [
                                  {
                                    "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)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "via": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "agent",
                                          "smb",
                                          "api_key"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "client_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)$"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "user_id",
                              "name",
                              "via"
                            ],
                            "additionalProperties": false
                          },
                          "subject": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "about": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "user_id": {
                                    "anyOf": [
                                      {
                                        "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)$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "email": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "user_id",
                                  "email",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "data": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "mine": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "occurred_at",
                          "room",
                          "actor",
                          "subject",
                          "about",
                          "data",
                          "mine"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/events/{event_id}": {
      "get": {
        "operationId": "get_event",
        "summary": "Get an event",
        "description": "Gets one event by its id (evt_...), if you can see it: the same record list_events returns.",
        "tags": [
          "Events"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^evt_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^evt_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "type": {
                          "type": "string"
                        },
                        "occurred_at": {
                          "type": "string"
                        },
                        "room": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "title"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "actor": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "person",
                                "agent",
                                "system"
                              ]
                            },
                            "user_id": {
                              "anyOf": [
                                {
                                  "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)$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "via": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "agent",
                                        "smb",
                                        "api_key"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "client_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)$"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "user_id",
                            "name",
                            "via"
                          ],
                          "additionalProperties": false
                        },
                        "subject": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "id",
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "about": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "user_id": {
                                  "anyOf": [
                                    {
                                      "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)$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "email": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "user_id",
                                "email",
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "data": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "mine": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "occurred_at",
                        "room",
                        "actor",
                        "subject",
                        "about",
                        "data",
                        "mine"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/event-types": {
      "get": {
        "operationId": "list_event_types",
        "summary": "List event types",
        "description": "Lists every kind of event SMB records, with what each one means, what it's about, and who can see it. Use these names in list_events types.",
        "tags": [
          "Events"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "subject_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "scope",
                              "editors",
                              "private"
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "description",
                          "subject_types",
                          "visibility"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/me/sidebar": {
      "get": {
        "operationId": "get_sidebar",
        "summary": "Get My Sidebar",
        "description": "Read your personal sidebar navigation (ordered visible page IDs), sections and item placement in the selected workspace. Returns the revision needed to save changes. Does not change tasks or anyone else's sidebar.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "navigation": {
                          "default": [
                            "library",
                            "plugins"
                          ],
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "library",
                              "businesses",
                              "rooms",
                              "lists",
                              "knowledge",
                              "plugins"
                            ]
                          },
                          "uniqueItems": true
                        },
                        "items": {
                          "maxItems": 500,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "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)$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^link:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^page:(home|library|businesses|rooms|lists|knowledge|plugins|goals|valuation|marketplace)$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^(business:biz|goal:gol|task:tsk|file:fil|room:rom)_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^valuation:val_[0-9a-f]{32}$"
                                  }
                                ]
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 240
                              },
                              "workspace_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)$"
                              },
                              "updated_at": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048,
                                "pattern": "^https?:\\/\\/[^/?#@\\s]+(?:[/?#][^\\s]*)?$"
                              },
                              "logo_url": {
                                "type": "string",
                                "maxLength": 2048,
                                "pattern": "^https?:\\/\\/[^/?#@\\s]+(?:[/?#][^\\s]*)?$"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "workspace_id",
                              "updated_at"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sections": {
                          "minItems": 2,
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "pinned",
                                      "recent"
                                    ]
                                  },
                                  {
                                    "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)$"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "collapsed": {
                                "type": "boolean"
                              },
                              "sort": {
                                "type": "string",
                                "enum": [
                                  "manual",
                                  "updated",
                                  "title"
                                ]
                              },
                              "item_ids": {
                                "maxItems": 500,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "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)$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^link:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^page:(home|library|businesses|rooms|lists|knowledge|plugins|goals|valuation|marketplace)$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^(business:biz|goal:gol|task:tsk|file:fil|room:rom)_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^valuation:val_[0-9a-f]{32}$"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "collapsed",
                              "sort",
                              "item_ids"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "revision",
                        "navigation",
                        "items",
                        "sections"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "tasks": {
                      "maxItems": 600,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "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)$"
                          },
                          "workspace_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)$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "workspace_id",
                          "title",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "receipt": {
                      "type": "object",
                      "properties": {
                        "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)$"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "replayed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "replayed"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "tasks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "patch": {
        "operationId": "update_sidebar",
        "summary": "Organize My Sidebar",
        "description": "Organize your own sidebar here. Call get_sidebar first; pass its revision. Up to 50 atomic actions: set_navigation (ordered page_ids; keep one; the rest stay in More), reset_navigation, create/rename/collapse/sort/delete sections (new UUID each), pin or move items: chat UUIDs, page:<id>, record IDs from SMB tools (business:, goal:, task:, file:, room:, valuation:) or link:<UUID> with title and url; reorder; unpin_all. Never changes sharing or others' sidebars.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "set_navigation"
                            },
                            "page_ids": {
                              "maxItems": 5,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "library",
                                  "businesses",
                                  "rooms",
                                  "lists",
                                  "knowledge",
                                  "plugins"
                                ]
                              },
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "action",
                            "page_ids"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "reset_navigation"
                            }
                          },
                          "required": [
                            "action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "unpin_all"
                            }
                          },
                          "required": [
                            "action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "create_section"
                            },
                            "section_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            }
                          },
                          "required": [
                            "action",
                            "section_id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "update_section"
                            },
                            "section_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "pinned",
                                    "recent"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "collapsed": {
                              "type": "boolean"
                            },
                            "sort": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "updated",
                                "title"
                              ]
                            }
                          },
                          "required": [
                            "action",
                            "section_id"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "delete_section"
                            },
                            "section_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "action",
                            "section_id"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "move_item"
                            },
                            "item_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "workspace_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 2048,
                              "pattern": "^https?:\\/\\/[^/?#@\\s]+(?:[/?#][^\\s]*)?$"
                            },
                            "logo_url": {
                              "type": "string",
                              "maxLength": 2048,
                              "pattern": "^https?:\\/\\/[^/?#@\\s]+(?:[/?#][^\\s]*)?$"
                            },
                            "section_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "pinned",
                                    "recent"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              ]
                            },
                            "before_item_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            }
                          },
                          "required": [
                            "action",
                            "item_id",
                            "section_id"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "reorder_sections"
                            },
                            "section_ids": {
                              "minItems": 2,
                              "maxItems": 32,
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "pinned",
                                      "recent"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "action",
                            "section_ids"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "reorder_items"
                            },
                            "section_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "pinned",
                                    "recent"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              ]
                            },
                            "item_ids": {
                              "maxItems": 500,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              }
                            }
                          },
                          "required": [
                            "action",
                            "section_id",
                            "item_ids"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "expected_revision",
                  "actions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "navigation": {
                          "default": [
                            "library",
                            "plugins"
                          ],
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "library",
                              "businesses",
                              "rooms",
                              "lists",
                              "knowledge",
                              "plugins"
                            ]
                          },
                          "uniqueItems": true
                        },
                        "items": {
                          "maxItems": 500,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "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)$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^link:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^page:(home|library|businesses|rooms|lists|knowledge|plugins|goals|valuation|marketplace)$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^(business:biz|goal:gol|task:tsk|file:fil|room:rom)_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^valuation:val_[0-9a-f]{32}$"
                                  }
                                ]
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 240
                              },
                              "workspace_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)$"
                              },
                              "updated_at": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048,
                                "pattern": "^https?:\\/\\/[^/?#@\\s]+(?:[/?#][^\\s]*)?$"
                              },
                              "logo_url": {
                                "type": "string",
                                "maxLength": 2048,
                                "pattern": "^https?:\\/\\/[^/?#@\\s]+(?:[/?#][^\\s]*)?$"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "workspace_id",
                              "updated_at"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sections": {
                          "minItems": 2,
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "pinned",
                                      "recent"
                                    ]
                                  },
                                  {
                                    "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)$"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "collapsed": {
                                "type": "boolean"
                              },
                              "sort": {
                                "type": "string",
                                "enum": [
                                  "manual",
                                  "updated",
                                  "title"
                                ]
                              },
                              "item_ids": {
                                "maxItems": 500,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "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)$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^link:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^page:(home|library|businesses|rooms|lists|knowledge|plugins|goals|valuation|marketplace)$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^(business:biz|goal:gol|task:tsk|file:fil|room:rom)_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^valuation:val_[0-9a-f]{32}$"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "collapsed",
                              "sort",
                              "item_ids"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "revision",
                        "navigation",
                        "items",
                        "sections"
                      ],
                      "additionalProperties": false
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "tasks": {
                      "maxItems": 600,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "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)$"
                          },
                          "workspace_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)$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "workspace_id",
                          "title",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "receipt": {
                      "type": "object",
                      "properties": {
                        "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)$"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "replayed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "replayed"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "request_id",
                    "tasks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/valuations/{valuation_id}/claim": {
      "post": {
        "operationId": "claim_valuation",
        "summary": "Claim Valuation",
        "description": "Attaches a guest valuation to one Business in the selected Workspace using the claim token returned by the original valuation. The token is accepted as input and is never returned again.",
        "tags": [
          "Valuations"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "valuation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^val_[0-9a-f]{32}$",
              "description": "Valuation to attach."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "claim_token": {
                    "type": "string",
                    "pattern": "^vclaim_[0-9a-f]{64}$",
                    "description": "Guest claim token returned with the public valuation."
                  }
                },
                "required": [
                  "business_id",
                  "claim_token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "valuation_id": {
                      "type": "string",
                      "pattern": "^val_[0-9a-f]{32}$",
                      "description": "Attached valuation."
                    },
                    "business_id": {
                      "type": "string",
                      "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "description": "Stable SMB Business ID."
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "attached": {
                      "type": "boolean"
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    }
                  },
                  "required": [
                    "valuation_id",
                    "business_id",
                    "workspace_id",
                    "attached",
                    "idempotent_replay",
                    "request_id",
                    "receipt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "minimum": 400,
                      "maximum": 599
                    },
                    "code": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms": {
      "get": {
        "operationId": "list_rooms",
        "summary": "List Rooms",
        "description": "Lists Rooms you can open, optionally for one Business. Does not change a Room.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "business_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Optional: only Rooms for or pointing at this Business."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "parent_room_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Optional: this Room's sub-rooms. Without it, sub-rooms list under their parent, or on their own for people who can't open the parent."
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "rooms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "room_id": {
                            "type": "string",
                            "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable Room ID."
                          },
                          "business_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "The Business it was made for, or null."
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "purpose": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 4000
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "archived_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "edit",
                              "full_access"
                            ]
                          },
                          "general_access": {
                            "type": "string",
                            "enum": [
                              "business",
                              "invited",
                              "workspace"
                            ],
                            "description": "Who else can open it."
                          },
                          "general_access_level": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "view",
                              "edit",
                              null
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "maxItems": 50,
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "attachment_id": {
                                  "type": "string",
                                  "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable attachment ID."
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "business",
                                    "list"
                                  ]
                                },
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Null if you can't open it."
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "attached_at": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "attachment_id",
                                "type",
                                "id",
                                "label",
                                "attached_at"
                              ]
                            }
                          },
                          "parent": {
                            "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                            "anyOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "room_id": {
                                    "type": "string",
                                    "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                    "description": "Stable Room ID."
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 300
                                  }
                                },
                                "required": [
                                  "room_id",
                                  "title"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sub_room_count": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "Open sub-rooms inside this Room that you can see."
                          }
                        },
                        "required": [
                          "room_id",
                          "business_id",
                          "title",
                          "status",
                          "revision",
                          "general_access",
                          "general_access_level",
                          "attachments",
                          "created_at",
                          "updated_at",
                          "access_level"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "rooms",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "create_room",
        "summary": "Create Room",
        "description": "Creates a Room; business_id optional (without one it starts invited-only). With parent_room_id it makes a sub-room: Full access on the parent required, Business taken from the parent, invited-only, one level deep. Returns an action receipt.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Optional. Needs edit access."
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "purpose": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "general_access": {
                    "type": "string",
                    "enum": [
                      "business",
                      "invited",
                      "workspace"
                    ],
                    "description": "Who else can open it."
                  },
                  "general_access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "description": "Most a member gets with workspace access."
                  },
                  "parent_room_id": {
                    "type": "string",
                    "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Optional. Makes a sub-room inside this Room (Full access needed)."
                  }
                },
                "required": [
                  "title"
                ],
                "allOf": [
                  {
                    "if": {
                      "required": [
                        "general_access"
                      ],
                      "properties": {
                        "general_access": {
                          "const": "business"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "business_id"
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}": {
      "get": {
        "operationId": "get_room",
        "summary": "Get Room",
        "description": "Gets one Room, who can open it and what it points at. Does not change it.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "patch": {
        "operationId": "update_room",
        "summary": "Update Room",
        "description": "Changes an active Room's title, purpose or general access (needs full access). Returns an action receipt.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "purpose": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "general_access": {
                    "type": "string",
                    "enum": [
                      "business",
                      "invited",
                      "workspace"
                    ],
                    "description": "Who else can open it."
                  },
                  "general_access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "description": "Most a member gets with workspace access."
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/archive": {
      "post": {
        "operationId": "archive_room",
        "summary": "Archive Room",
        "description": "Archives a Room without erasing its history. This lifecycle action is HTTP-only by default.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/restore": {
      "post": {
        "operationId": "restore_room",
        "summary": "Restore Room",
        "description": "Restores an archived Room without erasing its history. This lifecycle action is HTTP-only by default.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/attachments": {
      "post": {
        "operationId": "attach_room_resource",
        "summary": "Attach to a Room",
        "description": "Points a Room at a Business or List you can open (max 50); never shares it. Repeats change nothing.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "resource_type": {
                    "type": "string",
                    "enum": [
                      "business",
                      "list"
                    ]
                  },
                  "resource_id": {
                    "type": "string",
                    "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Optional; defaults to its name."
                  },
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "resource_type",
                  "resource_id"
                ],
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "resource_type": {
                          "const": "business"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "resource_id": {
                          "pattern": "^biz_"
                        }
                      }
                    },
                    "else": {
                      "properties": {
                        "resource_id": {
                          "pattern": "^list_"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/attachments/{attachment_id}/detach": {
      "post": {
        "operationId": "detach_room_resource",
        "summary": "Remove from a Room",
        "description": "Stops a Room pointing at a Business or List. Changes nothing else.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "From the Room's attachments."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The Business it was made for, or null."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "purpose": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "general_access": {
                          "type": "string",
                          "enum": [
                            "business",
                            "invited",
                            "workspace"
                          ],
                          "description": "Who else can open it."
                        },
                        "general_access_level": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "view",
                            "edit",
                            null
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "maxItems": 50,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "attachment_id": {
                                "type": "string",
                                "pattern": "^rmb_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable attachment ID."
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "business",
                                  "list"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^(biz|list)_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Null if you can't open it."
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "attached_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "attachment_id",
                              "type",
                              "id",
                              "label",
                              "attached_at"
                            ]
                          }
                        },
                        "parent": {
                          "description": "The Room this sub-room is inside, when you can open it; otherwise null.",
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "room_id": {
                                  "type": "string",
                                  "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable Room ID."
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "room_id",
                                "title"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sub_room_count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Open sub-rooms inside this Room that you can see."
                        }
                      },
                      "required": [
                        "room_id",
                        "business_id",
                        "title",
                        "status",
                        "revision",
                        "general_access",
                        "general_access_level",
                        "attachments",
                        "created_at",
                        "updated_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "action",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files": {
      "get": {
        "operationId": "list_files",
        "summary": "List Files",
        "description": "Lists accessible Files in the selected Workspace. An optional Business filter also discovers its generated artifacts and existing documents. Workspace selection is required through authentication; it is not a query parameter.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "business_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Optional Business filter. Omit to list accessible Files in the selected Workspace."
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "upload",
                "artifact",
                "legacy_document"
              ]
            }
          },
          {
            "name": "lifecycle",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "File cursor from a previous page."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "file_id": {
                            "type": "string",
                            "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable File ID."
                          },
                          "business_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Associated Business, or null for a Workspace File."
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 4000
                          },
                          "classification": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "financial",
                              "legal",
                              "operational",
                              "marketing",
                              "other",
                              null
                            ]
                          },
                          "tags": {
                            "type": "array",
                            "maxItems": 32,
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            }
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "upload",
                              "artifact",
                              "legacy_document"
                            ]
                          },
                          "lifecycle": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "current_version": {
                            "anyOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "file_version_id": {
                                    "type": "string",
                                    "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                    "description": "Immutable File version ID."
                                  },
                                  "version_number": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "content_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "size_bytes": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 104857600
                                  },
                                  "sha256": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^sha256:[0-9a-f]{64}$"
                                  },
                                  "processing_status": {
                                    "type": "string",
                                    "enum": [
                                      "pending_upload",
                                      "processing",
                                      "ready",
                                      "quarantined",
                                      "failed"
                                    ]
                                  },
                                  "processing_error": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "maxLength": 200,
                                    "description": "Upload processing failure code, when available."
                                  },
                                  "summary": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "maxLength": 500,
                                    "description": "What changed in this version, when the author said."
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "ready_at": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "file_version_id",
                                  "version_number",
                                  "content_type",
                                  "size_bytes",
                                  "sha256",
                                  "processing_status",
                                  "created_at",
                                  "ready_at"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "archived_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "edit",
                              "full_access"
                            ]
                          }
                        },
                        "required": [
                          "file_id",
                          "business_id",
                          "name",
                          "description",
                          "classification",
                          "tags",
                          "origin",
                          "lifecycle",
                          "current_version",
                          "revision",
                          "created_at",
                          "updated_at",
                          "archived_at",
                          "access_level"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "files",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/uploads": {
      "post": {
        "operationId": "start_file_upload",
        "summary": "Start File Upload",
        "description": "Creates a File in the authenticated Workspace and a resumable TUS upload session. A Business is optional; Room attachments require their Business. Uploaded content remains unavailable until malware scanning succeeds.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "room_id": {
                    "type": "string",
                    "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable Room ID."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "classification": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "financial",
                      "legal",
                      "operational",
                      "marketing",
                      "other",
                      null
                    ]
                  },
                  "tags": {
                    "type": "array",
                    "maxItems": 32,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "content_type": {
                    "type": "string",
                    "enum": [
                      "application/pdf",
                      "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                      "application/vnd.openxmlformats-officedocument.presentationml.presentation",
                      "text/csv",
                      "text/tab-separated-values",
                      "text/plain",
                      "text/markdown",
                      "application/json",
                      "image/png",
                      "image/jpeg",
                      "image/webp"
                    ]
                  },
                  "size_bytes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 104857600
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^sha256:[0-9a-f]{64}$"
                  },
                  "access_mode": {
                    "type": "string",
                    "enum": [
                      "inherit_room",
                      "restricted",
                      "private"
                    ],
                    "description": "Room attachment visibility. This field may be supplied only when room_id is present."
                  }
                },
                "required": [
                  "name",
                  "content_type",
                  "size_bytes"
                ],
                "allOf": [
                  {
                    "if": {
                      "required": [
                        "access_mode"
                      ]
                    },
                    "then": {
                      "required": [
                        "room_id"
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "upload": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "upload_id": {
                          "type": "string",
                          "pattern": "^upl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Resumable upload session ID."
                        },
                        "protocol": {
                          "type": "string",
                          "const": "tus"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "x-signature": {
                              "type": "string",
                              "minLength": 1
                            },
                            "upload-metadata": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Opaque TUS metadata header. Send it unchanged with the upload request."
                            }
                          },
                          "required": [
                            "x-signature",
                            "upload-metadata"
                          ]
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "max_size_bytes": {
                          "type": "integer",
                          "const": 104857600
                        }
                      },
                      "required": [
                        "upload_id",
                        "protocol",
                        "url",
                        "headers",
                        "expires_at",
                        "max_size_bytes"
                      ]
                    },
                    "room_file_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "upload",
                    "room_file_id",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "upload": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "upload_id": {
                          "type": "string",
                          "pattern": "^upl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Resumable upload session ID."
                        },
                        "protocol": {
                          "type": "string",
                          "const": "tus"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "x-signature": {
                              "type": "string",
                              "minLength": 1
                            },
                            "upload-metadata": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Opaque TUS metadata header. Send it unchanged with the upload request."
                            }
                          },
                          "required": [
                            "x-signature",
                            "upload-metadata"
                          ]
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "max_size_bytes": {
                          "type": "integer",
                          "const": 104857600
                        }
                      },
                      "required": [
                        "upload_id",
                        "protocol",
                        "url",
                        "headers",
                        "expires_at",
                        "max_size_bytes"
                      ]
                    },
                    "room_file_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "upload",
                    "room_file_id",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/file-uploads/{upload_id}/complete": {
      "post": {
        "operationId": "complete_file_upload",
        "summary": "Complete File Upload",
        "description": "Closes a resumable upload session and queues malware scanning. The File becomes ready only after the scan completes.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^upl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Upload session to complete."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/{file_id}/versions": {
      "post": {
        "operationId": "start_file_version_upload",
        "summary": "Upload New File Version",
        "description": "Starts a resumable TUS upload of a new version of an existing uploaded File. Finish it with complete_file_upload. The File keeps serving its current version until the new one passes malware scanning; then the File, and every Room that has it, shows the new version, and each Room's activity says who uploaded it. Requires edit access to the File and its current revision. One new version uploads at a time.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "file_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300,
                    "description": "Name of the uploaded file, kept with this version. The File's own name doesn't change."
                  },
                  "content_type": {
                    "type": "string",
                    "enum": [
                      "application/pdf",
                      "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                      "application/vnd.openxmlformats-officedocument.presentationml.presentation",
                      "text/csv",
                      "text/tab-separated-values",
                      "text/plain",
                      "text/markdown",
                      "application/json",
                      "image/png",
                      "image/jpeg",
                      "image/webp"
                    ]
                  },
                  "size_bytes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 104857600
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^sha256:[0-9a-f]{64}$"
                  }
                },
                "required": [
                  "expected_revision",
                  "content_type",
                  "size_bytes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "upload": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "upload_id": {
                          "type": "string",
                          "pattern": "^upl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Resumable upload session ID."
                        },
                        "protocol": {
                          "type": "string",
                          "const": "tus"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "x-signature": {
                              "type": "string",
                              "minLength": 1
                            },
                            "upload-metadata": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Opaque TUS metadata header. Send it unchanged with the upload request."
                            }
                          },
                          "required": [
                            "x-signature",
                            "upload-metadata"
                          ]
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "max_size_bytes": {
                          "type": "integer",
                          "const": 104857600
                        }
                      },
                      "required": [
                        "upload_id",
                        "protocol",
                        "url",
                        "headers",
                        "expires_at",
                        "max_size_bytes"
                      ]
                    },
                    "new_version": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "version_number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 104857600
                        },
                        "sha256": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^sha256:[0-9a-f]{64}$"
                        },
                        "processing_status": {
                          "type": "string",
                          "enum": [
                            "pending_upload",
                            "processing",
                            "ready",
                            "quarantined",
                            "failed"
                          ]
                        },
                        "processing_error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "Upload processing failure code, when available."
                        },
                        "summary": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 500,
                          "description": "What changed in this version, when the author said."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "ready_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "file_version_id",
                        "version_number",
                        "content_type",
                        "size_bytes",
                        "sha256",
                        "processing_status",
                        "created_at",
                        "ready_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "upload",
                    "new_version",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "upload": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "upload_id": {
                          "type": "string",
                          "pattern": "^upl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Resumable upload session ID."
                        },
                        "protocol": {
                          "type": "string",
                          "const": "tus"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "x-signature": {
                              "type": "string",
                              "minLength": 1
                            },
                            "upload-metadata": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Opaque TUS metadata header. Send it unchanged with the upload request."
                            }
                          },
                          "required": [
                            "x-signature",
                            "upload-metadata"
                          ]
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "max_size_bytes": {
                          "type": "integer",
                          "const": 104857600
                        }
                      },
                      "required": [
                        "upload_id",
                        "protocol",
                        "url",
                        "headers",
                        "expires_at",
                        "max_size_bytes"
                      ]
                    },
                    "new_version": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "version_number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 104857600
                        },
                        "sha256": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^sha256:[0-9a-f]{64}$"
                        },
                        "processing_status": {
                          "type": "string",
                          "enum": [
                            "pending_upload",
                            "processing",
                            "ready",
                            "quarantined",
                            "failed"
                          ]
                        },
                        "processing_error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "Upload processing failure code, when available."
                        },
                        "summary": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 500,
                          "description": "What changed in this version, when the author said."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "ready_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "file_version_id",
                        "version_number",
                        "content_type",
                        "size_bytes",
                        "sha256",
                        "processing_status",
                        "created_at",
                        "ready_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "upload",
                    "new_version",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "get": {
        "operationId": "list_file_versions",
        "summary": "List File Versions",
        "description": "Lists the 100 most recent versions of an accessible File, newest first, and marks the one in use. Versions still uploading or blocked by scanning are listed with their processing status. People who can only view the File see just the version in use.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "versions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "file_version_id": {
                            "type": "string",
                            "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Immutable File version ID."
                          },
                          "version_number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "content_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "size_bytes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 104857600
                          },
                          "sha256": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^sha256:[0-9a-f]{64}$"
                          },
                          "processing_status": {
                            "type": "string",
                            "enum": [
                              "pending_upload",
                              "processing",
                              "ready",
                              "quarantined",
                              "failed"
                            ]
                          },
                          "processing_error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200,
                            "description": "Upload processing failure code, when available."
                          },
                          "summary": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 500,
                            "description": "What changed in this version, when the author said."
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "ready_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "current": {
                            "type": "boolean",
                            "description": "Whether this is the version the File shows now."
                          }
                        },
                        "required": [
                          "file_version_id",
                          "version_number",
                          "content_type",
                          "size_bytes",
                          "sha256",
                          "processing_status",
                          "created_at",
                          "ready_at",
                          "current"
                        ]
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "versions",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/text": {
      "post": {
        "operationId": "create_text_file",
        "summary": "Create Text File",
        "description": "Creates a text File (Markdown by default; or plain text, CSV, TSV or JSON) from up to 1 MiB of UTF-8 text. It's ready to read right away. Optionally add it to a Room or a Business. Needs edit access, as uploading does.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1048576,
                    "description": "Up to 1 MiB of UTF-8 text. Tabs and line breaks are fine; other control characters aren't."
                  },
                  "content_type": {
                    "type": "string",
                    "enum": [
                      "text/markdown",
                      "text/plain",
                      "text/csv",
                      "text/tab-separated-values",
                      "application/json"
                    ],
                    "default": "text/markdown"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "classification": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "financial",
                      "legal",
                      "operational",
                      "marketing",
                      "other",
                      null
                    ]
                  },
                  "tags": {
                    "type": "array",
                    "maxItems": 32,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "room_id": {
                    "type": "string",
                    "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable Room ID."
                  },
                  "access_mode": {
                    "type": "string",
                    "enum": [
                      "inherit_room",
                      "restricted",
                      "private"
                    ],
                    "description": "Who in the Room can open it; only with room_id."
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Optional: what changed, in a few words. Shown with the version and in Room activity."
                  }
                },
                "required": [
                  "name",
                  "content"
                ],
                "allOf": [
                  {
                    "if": {
                      "required": [
                        "access_mode"
                      ]
                    },
                    "then": {
                      "required": [
                        "room_id"
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "new_version": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "version_number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 104857600
                        },
                        "sha256": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^sha256:[0-9a-f]{64}$"
                        },
                        "processing_status": {
                          "type": "string",
                          "enum": [
                            "pending_upload",
                            "processing",
                            "ready",
                            "quarantined",
                            "failed"
                          ]
                        },
                        "processing_error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "Upload processing failure code, when available."
                        },
                        "summary": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 500,
                          "description": "What changed in this version, when the author said."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "ready_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "file_version_id",
                        "version_number",
                        "content_type",
                        "size_bytes",
                        "sha256",
                        "processing_status",
                        "created_at",
                        "ready_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "room_file": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "room_file_id": {
                              "type": "string",
                              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Stable Room File attachment ID."
                            },
                            "room_id": {
                              "type": "string",
                              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Room containing this attachment."
                            },
                            "file": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_id": {
                                  "type": "string",
                                  "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable File ID."
                                },
                                "business_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Associated Business, or null for a Workspace File."
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 4000
                                },
                                "classification": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "financial",
                                    "legal",
                                    "operational",
                                    "marketing",
                                    "other",
                                    null
                                  ]
                                },
                                "tags": {
                                  "type": "array",
                                  "maxItems": 32,
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  }
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "upload",
                                    "artifact",
                                    "legacy_document"
                                  ]
                                },
                                "lifecycle": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "current_version": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "file_version_id": {
                                          "type": "string",
                                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                          "description": "Immutable File version ID."
                                        },
                                        "version_number": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "content_type": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "size_bytes": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 104857600
                                        },
                                        "sha256": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        },
                                        "processing_status": {
                                          "type": "string",
                                          "enum": [
                                            "pending_upload",
                                            "processing",
                                            "ready",
                                            "quarantined",
                                            "failed"
                                          ]
                                        },
                                        "processing_error": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "maxLength": 200,
                                          "description": "Upload processing failure code, when available."
                                        },
                                        "summary": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "maxLength": 500,
                                          "description": "What changed in this version, when the author said."
                                        },
                                        "created_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "ready_at": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "file_version_id",
                                        "version_number",
                                        "content_type",
                                        "size_bytes",
                                        "sha256",
                                        "processing_status",
                                        "created_at",
                                        "ready_at"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "archived_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                },
                                "access_level": {
                                  "type": "string",
                                  "enum": [
                                    "view",
                                    "edit",
                                    "full_access"
                                  ]
                                }
                              },
                              "required": [
                                "file_id",
                                "business_id",
                                "name",
                                "description",
                                "classification",
                                "tags",
                                "origin",
                                "lifecycle",
                                "current_version",
                                "revision",
                                "created_at",
                                "updated_at",
                                "archived_at",
                                "access_level"
                              ]
                            },
                            "file_version_id": {
                              "type": "string",
                              "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                            },
                            "access_mode": {
                              "type": "string",
                              "enum": [
                                "inherit_room",
                                "restricted",
                                "private"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "active",
                                "archived"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "attached_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            }
                          },
                          "required": [
                            "room_file_id",
                            "room_id",
                            "file",
                            "file_version_id",
                            "access_mode",
                            "status",
                            "revision",
                            "attached_at",
                            "updated_at",
                            "archived_at",
                            "access_level"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The File in the Room, when room_id was given."
                    }
                  },
                  "required": [
                    "file",
                    "new_version",
                    "room_file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "new_version": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "version_number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 104857600
                        },
                        "sha256": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^sha256:[0-9a-f]{64}$"
                        },
                        "processing_status": {
                          "type": "string",
                          "enum": [
                            "pending_upload",
                            "processing",
                            "ready",
                            "quarantined",
                            "failed"
                          ]
                        },
                        "processing_error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "Upload processing failure code, when available."
                        },
                        "summary": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 500,
                          "description": "What changed in this version, when the author said."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "ready_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "file_version_id",
                        "version_number",
                        "content_type",
                        "size_bytes",
                        "sha256",
                        "processing_status",
                        "created_at",
                        "ready_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "room_file": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "room_file_id": {
                              "type": "string",
                              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Stable Room File attachment ID."
                            },
                            "room_id": {
                              "type": "string",
                              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Room containing this attachment."
                            },
                            "file": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_id": {
                                  "type": "string",
                                  "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Stable File ID."
                                },
                                "business_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Associated Business, or null for a Workspace File."
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 4000
                                },
                                "classification": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "financial",
                                    "legal",
                                    "operational",
                                    "marketing",
                                    "other",
                                    null
                                  ]
                                },
                                "tags": {
                                  "type": "array",
                                  "maxItems": 32,
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  }
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "upload",
                                    "artifact",
                                    "legacy_document"
                                  ]
                                },
                                "lifecycle": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "current_version": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "properties": {
                                        "file_version_id": {
                                          "type": "string",
                                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                          "description": "Immutable File version ID."
                                        },
                                        "version_number": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "content_type": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "size_bytes": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 104857600
                                        },
                                        "sha256": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        },
                                        "processing_status": {
                                          "type": "string",
                                          "enum": [
                                            "pending_upload",
                                            "processing",
                                            "ready",
                                            "quarantined",
                                            "failed"
                                          ]
                                        },
                                        "processing_error": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "maxLength": 200,
                                          "description": "Upload processing failure code, when available."
                                        },
                                        "summary": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "maxLength": 500,
                                          "description": "What changed in this version, when the author said."
                                        },
                                        "created_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "ready_at": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "file_version_id",
                                        "version_number",
                                        "content_type",
                                        "size_bytes",
                                        "sha256",
                                        "processing_status",
                                        "created_at",
                                        "ready_at"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "archived_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                },
                                "access_level": {
                                  "type": "string",
                                  "enum": [
                                    "view",
                                    "edit",
                                    "full_access"
                                  ]
                                }
                              },
                              "required": [
                                "file_id",
                                "business_id",
                                "name",
                                "description",
                                "classification",
                                "tags",
                                "origin",
                                "lifecycle",
                                "current_version",
                                "revision",
                                "created_at",
                                "updated_at",
                                "archived_at",
                                "access_level"
                              ]
                            },
                            "file_version_id": {
                              "type": "string",
                              "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                            },
                            "access_mode": {
                              "type": "string",
                              "enum": [
                                "inherit_room",
                                "restricted",
                                "private"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "active",
                                "archived"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "attached_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            }
                          },
                          "required": [
                            "room_file_id",
                            "room_id",
                            "file",
                            "file_version_id",
                            "access_mode",
                            "status",
                            "revision",
                            "attached_at",
                            "updated_at",
                            "archived_at",
                            "access_level"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The File in the Room, when room_id was given."
                    }
                  },
                  "required": [
                    "file",
                    "new_version",
                    "room_file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/{file_id}/content": {
      "patch": {
        "operationId": "update_file_content",
        "summary": "Edit File Text",
        "description": "Saves a new version of a text File from content (the whole new text) or edits (exact old_text to new_text replacements, in order; each old_text must match one place). Needs edit access and the current revision. Every Room with the File shows the new version.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1048576,
                    "description": "The whole new text, up to 1 MiB. Or use edits."
                  },
                  "edits": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Applied in order. Copy old_text exactly, including spaces and line breaks.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "old_text": {
                          "type": "string",
                          "minLength": 1
                        },
                        "new_text": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "old_text",
                        "new_text"
                      ]
                    }
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Optional: what changed, in a few words. Shown with the version and in Room activity."
                  }
                },
                "required": [
                  "expected_revision"
                ],
                "oneOf": [
                  {
                    "required": [
                      "content"
                    ]
                  },
                  {
                    "required": [
                      "edits"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "new_version": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "version_number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 104857600
                        },
                        "sha256": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^sha256:[0-9a-f]{64}$"
                        },
                        "processing_status": {
                          "type": "string",
                          "enum": [
                            "pending_upload",
                            "processing",
                            "ready",
                            "quarantined",
                            "failed"
                          ]
                        },
                        "processing_error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "Upload processing failure code, when available."
                        },
                        "summary": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 500,
                          "description": "What changed in this version, when the author said."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "ready_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "file_version_id",
                        "version_number",
                        "content_type",
                        "size_bytes",
                        "sha256",
                        "processing_status",
                        "created_at",
                        "ready_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "new_version",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "read_file",
        "summary": "Read File",
        "description": "Reads a File's contents, up to 256 KiB at a time: text and JSON as UTF-8, other files as base64. Read longer text in pages: pass offset and max_bytes, then next_offset while has_more is true. Larger non-text files need download_file or download_room_file.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "file_version_id": {
                    "type": "string",
                    "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Immutable File version ID."
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 104857600,
                    "description": "Text files: where to start, in bytes (next_offset from the last page)."
                  },
                  "max_bytes": {
                    "type": "integer",
                    "minimum": 4,
                    "maximum": 262144,
                    "default": 262144,
                    "description": "Text files: page size in bytes. Pages never split a character."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file_content": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "file_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "encoding": {
                          "type": "string",
                          "enum": [
                            "utf8",
                            "base64"
                          ]
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 349528
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 262144,
                          "description": "Bytes in this content: the whole file, or this page."
                        },
                        "total_bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 104857600,
                          "description": "Size of the whole version in bytes."
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Where this content starts, in bytes."
                        },
                        "next_offset": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "description": "Pass as offset to read the next page; null at the end."
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "Whether more of the file comes after this content."
                        }
                      },
                      "required": [
                        "file_id",
                        "file_version_id",
                        "file_name",
                        "content_type",
                        "encoding",
                        "content",
                        "size_bytes",
                        "total_bytes",
                        "offset",
                        "next_offset",
                        "has_more"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file_content",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "operationId": "get_file",
        "summary": "Get File",
        "description": "Gets canonical metadata and processing state for one accessible File.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "patch": {
        "operationId": "update_file",
        "summary": "Update File",
        "description": "Updates File metadata with an optimistic revision precondition.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "classification": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "financial",
                      "legal",
                      "operational",
                      "marketing",
                      "other",
                      null
                    ]
                  },
                  "tags": {
                    "type": "array",
                    "maxItems": 32,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  }
                },
                "required": [
                  "expected_revision"
                ],
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "description"
                    ]
                  },
                  {
                    "required": [
                      "classification"
                    ]
                  },
                  {
                    "required": [
                      "tags"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/{file_id}/archive": {
      "post": {
        "operationId": "archive_file",
        "summary": "Archive File",
        "description": "Archives a File without deleting its versions or audit history.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/{file_id}/restore": {
      "post": {
        "operationId": "restore_file",
        "summary": "Restore File",
        "description": "Restores a File without deleting its versions or audit history.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Associated Business, or null for a Workspace File."
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "classification": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "financial",
                            "legal",
                            "operational",
                            "marketing",
                            "other",
                            null
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 32,
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "upload",
                            "artifact",
                            "legacy_document"
                          ]
                        },
                        "lifecycle": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "current_version": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "file_version_id": {
                                  "type": "string",
                                  "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                  "description": "Immutable File version ID."
                                },
                                "version_number": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "content_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "size_bytes": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 104857600
                                },
                                "sha256": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "processing_status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_upload",
                                    "processing",
                                    "ready",
                                    "quarantined",
                                    "failed"
                                  ]
                                },
                                "processing_error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 200,
                                  "description": "Upload processing failure code, when available."
                                },
                                "summary": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 500,
                                  "description": "What changed in this version, when the author said."
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "ready_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "file_version_id",
                                "version_number",
                                "content_type",
                                "size_bytes",
                                "sha256",
                                "processing_status",
                                "created_at",
                                "ready_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "business_id",
                        "name",
                        "description",
                        "classification",
                        "tags",
                        "origin",
                        "lifecycle",
                        "current_version",
                        "revision",
                        "created_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/files/{file_id}/download": {
      "post": {
        "operationId": "download_file",
        "summary": "Download File",
        "description": "Returns a short-lived authorized download URL, or bounded inline content for a generated artifact snapshot.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable File ID."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "file_version_id": {
                    "type": "string",
                    "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Immutable File version ID."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "delivery": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Delivered File."
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Delivered immutable version."
                        },
                        "file_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "delivery_type": {
                          "type": "string",
                          "enum": [
                            "signed_url",
                            "inline"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "content": {
                          "type": [
                            "object",
                            "array",
                            "string",
                            "number",
                            "boolean",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "file_version_id",
                        "file_name",
                        "content_type",
                        "delivery_type",
                        "url",
                        "expires_at",
                        "content"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "delivery",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-files/{room_file_id}/content": {
      "post": {
        "operationId": "read_room_file",
        "summary": "Read Room File",
        "description": "Reads a File's contents, up to 256 KiB at a time: text and JSON as UTF-8, other files as base64. Read longer text in pages: pass offset and max_bytes, then next_offset while has_more is true. Larger non-text files need download_file or download_room_file.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 104857600,
                    "description": "Text files: where to start, in bytes (next_offset from the last page)."
                  },
                  "max_bytes": {
                    "type": "integer",
                    "minimum": 4,
                    "maximum": 262144,
                    "default": 262144,
                    "description": "Text files: page size in bytes. Pages never split a character."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "file_content": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable File ID."
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Immutable File version ID."
                        },
                        "file_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "encoding": {
                          "type": "string",
                          "enum": [
                            "utf8",
                            "base64"
                          ]
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 349528
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 262144,
                          "description": "Bytes in this content: the whole file, or this page."
                        },
                        "total_bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 104857600,
                          "description": "Size of the whole version in bytes."
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Where this content starts, in bytes."
                        },
                        "next_offset": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "description": "Pass as offset to read the next page; null at the end."
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "Whether more of the file comes after this content."
                        }
                      },
                      "required": [
                        "file_id",
                        "file_version_id",
                        "file_name",
                        "content_type",
                        "encoding",
                        "content",
                        "size_bytes",
                        "total_bytes",
                        "offset",
                        "next_offset",
                        "has_more"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "file_content",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/files": {
      "get": {
        "operationId": "list_room_files",
        "summary": "List Room Files",
        "description": "Lists the Files visible in one Room, each at the version the Room shows (the File's newest ready version).",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Room File cursor from a previous page."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "room_file_id": {
                            "type": "string",
                            "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable Room File attachment ID."
                          },
                          "room_id": {
                            "type": "string",
                            "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Room containing this attachment."
                          },
                          "file": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "file_id": {
                                "type": "string",
                                "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Stable File ID."
                              },
                              "business_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                "description": "Associated Business, or null for a Workspace File."
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 4000
                              },
                              "classification": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "financial",
                                  "legal",
                                  "operational",
                                  "marketing",
                                  "other",
                                  null
                                ]
                              },
                              "tags": {
                                "type": "array",
                                "maxItems": 32,
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "origin": {
                                "type": "string",
                                "enum": [
                                  "upload",
                                  "artifact",
                                  "legacy_document"
                                ]
                              },
                              "lifecycle": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "archived"
                                ]
                              },
                              "current_version": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "file_version_id": {
                                        "type": "string",
                                        "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                        "description": "Immutable File version ID."
                                      },
                                      "version_number": {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      "content_type": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "size_bytes": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 104857600
                                      },
                                      "sha256": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      },
                                      "processing_status": {
                                        "type": "string",
                                        "enum": [
                                          "pending_upload",
                                          "processing",
                                          "ready",
                                          "quarantined",
                                          "failed"
                                        ]
                                      },
                                      "processing_error": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 200,
                                        "description": "Upload processing failure code, when available."
                                      },
                                      "summary": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 500,
                                        "description": "What changed in this version, when the author said."
                                      },
                                      "created_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "ready_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "format": "date-time"
                                      }
                                    },
                                    "required": [
                                      "file_version_id",
                                      "version_number",
                                      "content_type",
                                      "size_bytes",
                                      "sha256",
                                      "processing_status",
                                      "created_at",
                                      "ready_at"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "revision": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "archived_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "access_level": {
                                "type": "string",
                                "enum": [
                                  "view",
                                  "edit",
                                  "full_access"
                                ]
                              }
                            },
                            "required": [
                              "file_id",
                              "business_id",
                              "name",
                              "description",
                              "classification",
                              "tags",
                              "origin",
                              "lifecycle",
                              "current_version",
                              "revision",
                              "created_at",
                              "updated_at",
                              "archived_at",
                              "access_level"
                            ]
                          },
                          "file_version_id": {
                            "type": "string",
                            "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                          },
                          "access_mode": {
                            "type": "string",
                            "enum": [
                              "inherit_room",
                              "restricted",
                              "private"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "active",
                              "archived"
                            ]
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "attached_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "archived_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "edit",
                              "full_access"
                            ]
                          }
                        },
                        "required": [
                          "room_file_id",
                          "room_id",
                          "file",
                          "file_version_id",
                          "access_mode",
                          "status",
                          "revision",
                          "attached_at",
                          "updated_at",
                          "archived_at",
                          "access_level"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "files",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "attach_room_file",
        "summary": "Attach File to Room",
        "description": "Attaches a ready File to a Room. The Room shows its newest version from then on, including later uploads.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "file_id": {
                    "type": "string",
                    "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable File ID."
                  },
                  "file_version_id": {
                    "type": "string",
                    "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Immutable File version ID."
                  },
                  "access_mode": {
                    "type": "string",
                    "enum": [
                      "inherit_room",
                      "restricted",
                      "private"
                    ]
                  }
                },
                "required": [
                  "file_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room_file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room File attachment ID."
                        },
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room containing this attachment."
                        },
                        "file": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "file_id": {
                              "type": "string",
                              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Stable File ID."
                            },
                            "business_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Associated Business, or null for a Workspace File."
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 4000
                            },
                            "classification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "financial",
                                "legal",
                                "operational",
                                "marketing",
                                "other",
                                null
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "maxItems": 32,
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "upload",
                                "artifact",
                                "legacy_document"
                              ]
                            },
                            "lifecycle": {
                              "type": "string",
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "current_version": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "file_version_id": {
                                      "type": "string",
                                      "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                      "description": "Immutable File version ID."
                                    },
                                    "version_number": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "content_type": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "size_bytes": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 104857600
                                    },
                                    "sha256": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "pattern": "^sha256:[0-9a-f]{64}$"
                                    },
                                    "processing_status": {
                                      "type": "string",
                                      "enum": [
                                        "pending_upload",
                                        "processing",
                                        "ready",
                                        "quarantined",
                                        "failed"
                                      ]
                                    },
                                    "processing_error": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 200,
                                      "description": "Upload processing failure code, when available."
                                    },
                                    "summary": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 500,
                                      "description": "What changed in this version, when the author said."
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "ready_at": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "file_version_id",
                                    "version_number",
                                    "content_type",
                                    "size_bytes",
                                    "sha256",
                                    "processing_status",
                                    "created_at",
                                    "ready_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            }
                          },
                          "required": [
                            "file_id",
                            "business_id",
                            "name",
                            "description",
                            "classification",
                            "tags",
                            "origin",
                            "lifecycle",
                            "current_version",
                            "revision",
                            "created_at",
                            "updated_at",
                            "archived_at",
                            "access_level"
                          ]
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                        },
                        "access_mode": {
                          "type": "string",
                          "enum": [
                            "inherit_room",
                            "restricted",
                            "private"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "attached_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "room_file_id",
                        "room_id",
                        "file",
                        "file_version_id",
                        "access_mode",
                        "status",
                        "revision",
                        "attached_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room_file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room_file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room File attachment ID."
                        },
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room containing this attachment."
                        },
                        "file": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "file_id": {
                              "type": "string",
                              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Stable File ID."
                            },
                            "business_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Associated Business, or null for a Workspace File."
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 4000
                            },
                            "classification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "financial",
                                "legal",
                                "operational",
                                "marketing",
                                "other",
                                null
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "maxItems": 32,
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "upload",
                                "artifact",
                                "legacy_document"
                              ]
                            },
                            "lifecycle": {
                              "type": "string",
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "current_version": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "file_version_id": {
                                      "type": "string",
                                      "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                      "description": "Immutable File version ID."
                                    },
                                    "version_number": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "content_type": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "size_bytes": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 104857600
                                    },
                                    "sha256": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "pattern": "^sha256:[0-9a-f]{64}$"
                                    },
                                    "processing_status": {
                                      "type": "string",
                                      "enum": [
                                        "pending_upload",
                                        "processing",
                                        "ready",
                                        "quarantined",
                                        "failed"
                                      ]
                                    },
                                    "processing_error": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 200,
                                      "description": "Upload processing failure code, when available."
                                    },
                                    "summary": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 500,
                                      "description": "What changed in this version, when the author said."
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "ready_at": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "file_version_id",
                                    "version_number",
                                    "content_type",
                                    "size_bytes",
                                    "sha256",
                                    "processing_status",
                                    "created_at",
                                    "ready_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            }
                          },
                          "required": [
                            "file_id",
                            "business_id",
                            "name",
                            "description",
                            "classification",
                            "tags",
                            "origin",
                            "lifecycle",
                            "current_version",
                            "revision",
                            "created_at",
                            "updated_at",
                            "archived_at",
                            "access_level"
                          ]
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                        },
                        "access_mode": {
                          "type": "string",
                          "enum": [
                            "inherit_room",
                            "restricted",
                            "private"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "attached_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "room_file_id",
                        "room_id",
                        "file",
                        "file_version_id",
                        "access_mode",
                        "status",
                        "revision",
                        "attached_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room_file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-files/{room_file_id}/archive": {
      "post": {
        "operationId": "archive_room_file",
        "summary": "Archive Room File",
        "description": "Removes a File attachment from a Room without deleting the File or version.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room_file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room File attachment ID."
                        },
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room containing this attachment."
                        },
                        "file": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "file_id": {
                              "type": "string",
                              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Stable File ID."
                            },
                            "business_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Associated Business, or null for a Workspace File."
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 4000
                            },
                            "classification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "financial",
                                "legal",
                                "operational",
                                "marketing",
                                "other",
                                null
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "maxItems": 32,
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "upload",
                                "artifact",
                                "legacy_document"
                              ]
                            },
                            "lifecycle": {
                              "type": "string",
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "current_version": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "file_version_id": {
                                      "type": "string",
                                      "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                      "description": "Immutable File version ID."
                                    },
                                    "version_number": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "content_type": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "size_bytes": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 104857600
                                    },
                                    "sha256": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "pattern": "^sha256:[0-9a-f]{64}$"
                                    },
                                    "processing_status": {
                                      "type": "string",
                                      "enum": [
                                        "pending_upload",
                                        "processing",
                                        "ready",
                                        "quarantined",
                                        "failed"
                                      ]
                                    },
                                    "processing_error": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 200,
                                      "description": "Upload processing failure code, when available."
                                    },
                                    "summary": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 500,
                                      "description": "What changed in this version, when the author said."
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "ready_at": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "file_version_id",
                                    "version_number",
                                    "content_type",
                                    "size_bytes",
                                    "sha256",
                                    "processing_status",
                                    "created_at",
                                    "ready_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            }
                          },
                          "required": [
                            "file_id",
                            "business_id",
                            "name",
                            "description",
                            "classification",
                            "tags",
                            "origin",
                            "lifecycle",
                            "current_version",
                            "revision",
                            "created_at",
                            "updated_at",
                            "archived_at",
                            "access_level"
                          ]
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                        },
                        "access_mode": {
                          "type": "string",
                          "enum": [
                            "inherit_room",
                            "restricted",
                            "private"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "attached_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "room_file_id",
                        "room_id",
                        "file",
                        "file_version_id",
                        "access_mode",
                        "status",
                        "revision",
                        "attached_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room_file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-files/{room_file_id}/restore": {
      "post": {
        "operationId": "restore_room_file",
        "summary": "Restore Room File",
        "description": "Returns a File attachment from a Room without deleting the File or version.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "room_file": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Room File attachment ID."
                        },
                        "room_id": {
                          "type": "string",
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room containing this attachment."
                        },
                        "file": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "file_id": {
                              "type": "string",
                              "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Stable File ID."
                            },
                            "business_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                              "description": "Associated Business, or null for a Workspace File."
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 4000
                            },
                            "classification": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "financial",
                                "legal",
                                "operational",
                                "marketing",
                                "other",
                                null
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "maxItems": 32,
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "upload",
                                "artifact",
                                "legacy_document"
                              ]
                            },
                            "lifecycle": {
                              "type": "string",
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "current_version": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "file_version_id": {
                                      "type": "string",
                                      "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                                      "description": "Immutable File version ID."
                                    },
                                    "version_number": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "content_type": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "size_bytes": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 104857600
                                    },
                                    "sha256": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "pattern": "^sha256:[0-9a-f]{64}$"
                                    },
                                    "processing_status": {
                                      "type": "string",
                                      "enum": [
                                        "pending_upload",
                                        "processing",
                                        "ready",
                                        "quarantined",
                                        "failed"
                                      ]
                                    },
                                    "processing_error": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 200,
                                      "description": "Upload processing failure code, when available."
                                    },
                                    "summary": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "maxLength": 500,
                                      "description": "What changed in this version, when the author said."
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "ready_at": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "file_version_id",
                                    "version_number",
                                    "content_type",
                                    "size_bytes",
                                    "sha256",
                                    "processing_status",
                                    "created_at",
                                    "ready_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "archived_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "access_level": {
                              "type": "string",
                              "enum": [
                                "view",
                                "edit",
                                "full_access"
                              ]
                            }
                          },
                          "required": [
                            "file_id",
                            "business_id",
                            "name",
                            "description",
                            "classification",
                            "tags",
                            "origin",
                            "lifecycle",
                            "current_version",
                            "revision",
                            "created_at",
                            "updated_at",
                            "archived_at",
                            "access_level"
                          ]
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "The File version this Room shows: its newest ready version, which follows new uploads."
                        },
                        "access_mode": {
                          "type": "string",
                          "enum": [
                            "inherit_room",
                            "restricted",
                            "private"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "archived"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "attached_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        }
                      },
                      "required": [
                        "room_file_id",
                        "room_id",
                        "file",
                        "file_version_id",
                        "access_mode",
                        "status",
                        "revision",
                        "attached_at",
                        "updated_at",
                        "archived_at",
                        "access_level"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "room_file",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-files/{room_file_id}/download": {
      "post": {
        "operationId": "download_room_file",
        "summary": "Download Room File",
        "description": "Returns authorized delivery for the File version a Room shows (its newest ready version).",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "preview",
                      "download"
                    ],
                    "description": "Why the file is being opened. Recorded in the Room's activity as viewed or downloaded; defaults to download."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "delivery": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "pattern": "^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Delivered File."
                        },
                        "file_version_id": {
                          "type": "string",
                          "pattern": "^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Delivered immutable version."
                        },
                        "file_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "content_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "delivery_type": {
                          "type": "string",
                          "enum": [
                            "signed_url",
                            "inline"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "content": {
                          "type": [
                            "object",
                            "array",
                            "string",
                            "number",
                            "boolean",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "file_id",
                        "file_version_id",
                        "file_name",
                        "content_type",
                        "delivery_type",
                        "url",
                        "expires_at",
                        "content"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "delivery",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/participants": {
      "get": {
        "operationId": "list_room_participants",
        "summary": "List Room Participants",
        "description": "Lists active users and pending email invitations for one Room.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Opaque Room participant cursor from a previous page."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "participants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "participant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "user",
                              "email_invite"
                            ]
                          },
                          "user_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "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}$"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200,
                            "description": "A joined participant's name; null for invitations."
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "edit",
                              "full_access"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "pending",
                              "revoked"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "expires_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "participant_id",
                          "type",
                          "access_level",
                          "status",
                          "created_at"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "participants",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "invite_room_participant",
        "summary": "Invite Room Participant",
        "description": "Sends a single-use, email-bound invitation to one Room without adding Workspace membership.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  },
                  "access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit",
                      "full_access"
                    ]
                  },
                  "message": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                },
                "required": [
                  "email",
                  "access_level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "participant": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "participant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "user",
                            "email_invite"
                          ]
                        },
                        "user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "A joined participant's name; null for invitations."
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "pending",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "participant_id",
                        "type",
                        "access_level",
                        "status",
                        "created_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "participant",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "participant": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "participant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "user",
                            "email_invite"
                          ]
                        },
                        "user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "A joined participant's name; null for invitations."
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "pending",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "participant_id",
                        "type",
                        "access_level",
                        "status",
                        "created_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "participant",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/participants/{participant_id}": {
      "patch": {
        "operationId": "update_room_participant",
        "summary": "Update Room Participant",
        "description": "Changes an active participant or pending invitation access level.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "participant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit",
                      "full_access"
                    ]
                  }
                },
                "required": [
                  "access_level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "participant": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "participant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "user",
                            "email_invite"
                          ]
                        },
                        "user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "A joined participant's name; null for invitations."
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "pending",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "participant_id",
                        "type",
                        "access_level",
                        "status",
                        "created_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "participant",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/rooms/{room_id}/participants/{participant_id}/revoke": {
      "post": {
        "operationId": "revoke_room_participant",
        "summary": "Revoke Room Participant",
        "description": "Revokes an active participant or pending Room invitation.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room ID."
            }
          },
          {
            "name": "participant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "participant": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "participant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "user",
                            "email_invite"
                          ]
                        },
                        "user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200,
                          "description": "A joined participant's name; null for invitations."
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "pending",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "participant_id",
                        "type",
                        "access_level",
                        "status",
                        "created_at"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "participant",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-files/{room_file_id}/permissions": {
      "get": {
        "operationId": "list_room_file_permissions",
        "summary": "List Room File Permissions",
        "description": "Lists explicit user grants for a restricted Room File.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Opaque Room File permission cursor from a previous page."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "permission_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "room_file_id": {
                            "type": "string",
                            "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Room File governed by this grant."
                          },
                          "user_id": {
                            "type": "string",
                            "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}$"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email"
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "edit",
                              "full_access"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "revoked"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "permission_id",
                          "room_file_id",
                          "user_id",
                          "access_level",
                          "status"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "permissions",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "set_room_file_permission",
        "summary": "Set Room File Permission",
        "description": "Creates or replaces one user grant and changes the attachment to restricted access.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "user_id": {
                    "type": "string",
                    "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}$"
                  },
                  "access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit",
                      "full_access"
                    ]
                  }
                },
                "required": [
                  "user_id",
                  "access_level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "permission": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "permission_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room File governed by this grant."
                        },
                        "user_id": {
                          "type": "string",
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "permission_id",
                        "room_file_id",
                        "user_id",
                        "access_level",
                        "status"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "permission",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "permission": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "permission_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room File governed by this grant."
                        },
                        "user_id": {
                          "type": "string",
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "permission_id",
                        "room_file_id",
                        "user_id",
                        "access_level",
                        "status"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "permission",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/room-files/{room_file_id}/permissions/{permission_id}/revoke": {
      "post": {
        "operationId": "revoke_room_file_permission",
        "summary": "Revoke Room File Permission",
        "description": "Revokes one explicit user grant from a restricted Room File.",
        "tags": [
          "Rooms"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "room_file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Room File attachment ID."
            }
          },
          {
            "name": "permission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "permission": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "permission_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "room_file_id": {
                          "type": "string",
                          "pattern": "^rfl_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room File governed by this grant."
                        },
                        "user_id": {
                          "type": "string",
                          "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}$"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "edit",
                            "full_access"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "revoked"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "permission_id",
                        "room_file_id",
                        "user_id",
                        "access_level",
                        "status"
                      ]
                    },
                    "action_receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "permission",
                    "action_receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/goals": {
      "get": {
        "operationId": "list_goals",
        "summary": "List Goals",
        "description": "Lists Goals for one Business that the caller can currently access. HTTP supports navigation without adding a redundant default MCP tool.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "business_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Business whose Goals should be listed."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "completed",
                "canceled"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "goal_id": {
                            "type": "string",
                            "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable Goal ID."
                          },
                          "business_id": {
                            "type": "string",
                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable SMB Business ID."
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 10000
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "completed",
                              "canceled"
                            ]
                          },
                          "accountable_user_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "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}$"
                          },
                          "due_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "terminal_reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 4000
                          },
                          "completed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "canceled_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "created_by": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "service_account"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "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}$"
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ]
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "goal_id",
                          "business_id",
                          "title",
                          "status",
                          "created_by",
                          "revision",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "create_goal",
        "summary": "Create Goal",
        "description": "Creates a desired Business outcome with a measurable title and optional owner and due date. Returns an action receipt.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "expected_business_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "accountable_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "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}$"
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                },
                "required": [
                  "business_id",
                  "expected_business_revision",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "completed",
                            "canceled"
                          ]
                        },
                        "accountable_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "terminal_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "created_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "goal_id",
                        "business_id",
                        "title",
                        "status",
                        "created_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "completed",
                            "canceled"
                          ]
                        },
                        "accountable_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "terminal_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "created_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "goal_id",
                        "business_id",
                        "title",
                        "status",
                        "created_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/goals/{goal_id}": {
      "get": {
        "operationId": "get_goal",
        "summary": "Get Goal",
        "description": "Gets one exact Goal and its current progress when its Goal ID is known. Does not change the Goal.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Goal ID."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "completed",
                            "canceled"
                          ]
                        },
                        "accountable_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "terminal_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "created_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "goal_id",
                        "business_id",
                        "title",
                        "status",
                        "created_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "patch": {
        "operationId": "update_goal",
        "summary": "Update Goal",
        "description": "Updates an active Goal with a revision precondition. Completing or canceling it requires a terminal reason.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Goal ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "accountable_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "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}$"
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "canceled"
                    ]
                  },
                  "terminal_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID."
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "completed",
                            "canceled"
                          ]
                        },
                        "accountable_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "terminal_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "created_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "goal_id",
                        "business_id",
                        "title",
                        "status",
                        "created_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/goals/{goal_id}/task-plan": {
      "post": {
        "operationId": "create_goal_task_plan",
        "summary": "Create Goal Task Plan",
        "description": "Starts a durable, business-aware planning run for an active Goal. Requires businesses:read, valuations:read, documents:read, goals:read, and tasks:read in addition to tasks:write. The generated Tasks remain a reviewable plan until a full-access user explicitly approves it.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Goal ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Stable SMB Business ID."
                  },
                  "expected_business_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expected_goal_revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "business_id",
                  "expected_business_revision",
                  "expected_goal_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_plan_id": {
                          "type": "string",
                          "pattern": "^gtp_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal task-plan ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Business used to build the task plan."
                        },
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Goal addressed by the task plan."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "generating",
                            "pending_approval",
                            "applied",
                            "failed"
                          ]
                        },
                        "goal_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "business_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "context_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 100
                        },
                        "proposed_tasks": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4000
                              },
                              "proposal_reason": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "proposal_evidence": {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 8,
                                "items": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            },
                            "required": [
                              "title",
                              "description",
                              "proposal_reason",
                              "proposal_evidence"
                            ]
                          }
                        },
                        "created_task_ids": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Task created from an approved plan."
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "approved_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_plan_id",
                        "business_id",
                        "goal_id",
                        "status",
                        "goal_revision",
                        "business_revision",
                        "proposed_tasks",
                        "created_task_ids",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_plan_id": {
                          "type": "string",
                          "pattern": "^gtp_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal task-plan ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Business used to build the task plan."
                        },
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Goal addressed by the task plan."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "generating",
                            "pending_approval",
                            "applied",
                            "failed"
                          ]
                        },
                        "goal_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "business_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "context_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 100
                        },
                        "proposed_tasks": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4000
                              },
                              "proposal_reason": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "proposal_evidence": {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 8,
                                "items": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            },
                            "required": [
                              "title",
                              "description",
                              "proposal_reason",
                              "proposal_evidence"
                            ]
                          }
                        },
                        "created_task_ids": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Task created from an approved plan."
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "approved_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_plan_id",
                        "business_id",
                        "goal_id",
                        "status",
                        "goal_revision",
                        "business_revision",
                        "proposed_tasks",
                        "created_task_ids",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/goal-task-plans/{task_plan_id}": {
      "get": {
        "operationId": "get_goal_task_plan",
        "summary": "Get Goal Task Plan",
        "description": "Gets the current generated task plan, including its evidence-backed proposed Tasks and approval status. Requires businesses:read, valuations:read, documents:read, and goals:read in addition to tasks:read.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_plan_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gtp_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Goal task-plan ID."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_plan_id": {
                          "type": "string",
                          "pattern": "^gtp_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal task-plan ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Business used to build the task plan."
                        },
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Goal addressed by the task plan."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "generating",
                            "pending_approval",
                            "applied",
                            "failed"
                          ]
                        },
                        "goal_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "business_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "context_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 100
                        },
                        "proposed_tasks": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4000
                              },
                              "proposal_reason": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "proposal_evidence": {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 8,
                                "items": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            },
                            "required": [
                              "title",
                              "description",
                              "proposal_reason",
                              "proposal_evidence"
                            ]
                          }
                        },
                        "created_task_ids": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Task created from an approved plan."
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "approved_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_plan_id",
                        "business_id",
                        "goal_id",
                        "status",
                        "goal_revision",
                        "business_revision",
                        "proposed_tasks",
                        "created_task_ids",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/goal-task-plans/{task_plan_id}/approve": {
      "post": {
        "operationId": "approve_goal_task_plan",
        "summary": "Approve Goal Task Plan",
        "description": "Explicitly approves a completed plan and atomically creates its Tasks as agent-authored proposals. Requires businesses:read, valuations:read, documents:read, goals:read, and tasks:read in addition to tasks:write. The Tasks still require the normal Task decision before assignment.",
        "tags": [
          "Goals"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_plan_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gtp_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Goal task-plan ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_plan_id": {
                          "type": "string",
                          "pattern": "^gtp_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Goal task-plan ID."
                        },
                        "business_id": {
                          "type": "string",
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Business used to build the task plan."
                        },
                        "goal_id": {
                          "type": "string",
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Goal addressed by the task plan."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "generating",
                            "pending_approval",
                            "applied",
                            "failed"
                          ]
                        },
                        "goal_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "business_revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "context_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 100
                        },
                        "proposed_tasks": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4000
                              },
                              "proposal_reason": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "proposal_evidence": {
                                "type": "array",
                                "minItems": 1,
                                "maxItems": 8,
                                "items": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            },
                            "required": [
                              "title",
                              "description",
                              "proposal_reason",
                              "proposal_evidence"
                            ]
                          }
                        },
                        "created_task_ids": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Task created from an approved plan."
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "approved_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_plan_id",
                        "business_id",
                        "goal_id",
                        "status",
                        "goal_revision",
                        "business_revision",
                        "proposed_tasks",
                        "created_task_ids",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/tasks": {
      "get": {
        "operationId": "list_tasks",
        "summary": "List Tasks",
        "description": "Lists a Business's or Room's Tasks, optionally by Goal or state. Read-only.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "business_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "room_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
            }
          },
          {
            "name": "goal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Optional Goal filter."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "proposed",
                "ready",
                "in_progress",
                "completed",
                "rejected",
                "canceled"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "task_id": {
                            "type": "string",
                            "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable Task ID."
                          },
                          "business_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Stable SMB Business ID the Task is for. Null for a Task in a Room without a Business."
                          },
                          "room_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "description": "Room the Task is in. Tasks in a Room follow the Room's access."
                          },
                          "goal_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 10000
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "ready",
                              "in_progress",
                              "completed",
                              "rejected",
                              "canceled"
                            ]
                          },
                          "proposal_source": {
                            "type": "string",
                            "enum": [
                              "user",
                              "agent",
                              "system"
                            ]
                          },
                          "proposal_source_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "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}$"
                          },
                          "proposed_by": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "service_account"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "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}$"
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ]
                          },
                          "proposal_reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "proposal_evidence": {
                            "type": "array",
                            "items": {}
                          },
                          "decision_reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 4000
                          },
                          "assignee_user_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "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}$"
                          },
                          "assignee_email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "todo",
                              "request",
                              "upload",
                              "connect",
                              "answer",
                              "sign",
                              "approve"
                            ]
                          },
                          "due_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "started_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "completion_evidence": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {}
                          },
                          "completed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "cancellation_reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 4000
                          },
                          "canceled_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "task_id",
                          "title",
                          "status",
                          "proposed_by",
                          "revision",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "has_more",
                    "next_cursor",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      },
      "post": {
        "operationId": "create_task",
        "summary": "Create Task",
        "description": "Creates a proposed or ready Task in a Room (room_id) or for a Business (business_id, expected_business_revision). Include a proposal_reason. For proposed Tasks, omit assignees, due_at and decision_reason.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "business_id": {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  },
                  "room_id": {
                    "type": "string",
                    "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  },
                  "expected_business_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "goal_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "proposed",
                      "ready"
                    ]
                  },
                  "proposal_reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "pattern": "\\S",
                    "description": "Why this Task helps, grounded in the request or evidence."
                  },
                  "proposal_evidence": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {}
                  },
                  "decision_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "assignee_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "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}$"
                  },
                  "assignee_email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "todo",
                      "request",
                      "upload",
                      "connect",
                      "answer",
                      "sign",
                      "approve"
                    ]
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                },
                "required": [
                  "title",
                  "status",
                  "proposal_reason"
                ],
                "oneOf": [
                  {
                    "required": [
                      "room_id"
                    ]
                  },
                  {
                    "required": [
                      "business_id",
                      "expected_business_revision"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing resource or idempotent replay was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Task ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID the Task is for. Null for a Task in a Room without a Business."
                        },
                        "room_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room the Task is in. Tasks in a Room follow the Room's access."
                        },
                        "goal_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "ready",
                            "in_progress",
                            "completed",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "proposal_source": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "system"
                          ]
                        },
                        "proposal_source_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "proposed_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "proposal_reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "proposal_evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "decision_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "assignee_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "assignee_email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "todo",
                            "request",
                            "upload",
                            "connect",
                            "answer",
                            "sign",
                            "approve"
                          ]
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "started_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "completion_evidence": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {}
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "cancellation_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_id",
                        "title",
                        "status",
                        "proposed_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The resource was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Task ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID the Task is for. Null for a Task in a Room without a Business."
                        },
                        "room_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room the Task is in. Tasks in a Room follow the Room's access."
                        },
                        "goal_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "ready",
                            "in_progress",
                            "completed",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "proposal_source": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "system"
                          ]
                        },
                        "proposal_source_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "proposed_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "proposal_reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "proposal_evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "decision_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "assignee_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "assignee_email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "todo",
                            "request",
                            "upload",
                            "connect",
                            "answer",
                            "sign",
                            "approve"
                          ]
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "started_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "completion_evidence": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {}
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "cancellation_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_id",
                        "title",
                        "status",
                        "proposed_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/tasks/{task_id}": {
      "get": {
        "operationId": "get_task",
        "summary": "Get Task",
        "description": "Gets one exact Task when its Task ID is known. Does not change the Task.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Task ID."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Task ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID the Task is for. Null for a Task in a Room without a Business."
                        },
                        "room_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room the Task is in. Tasks in a Room follow the Room's access."
                        },
                        "goal_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "ready",
                            "in_progress",
                            "completed",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "proposal_source": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "system"
                          ]
                        },
                        "proposal_source_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "proposed_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "proposal_reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "proposal_evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "decision_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "assignee_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "assignee_email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "todo",
                            "request",
                            "upload",
                            "connect",
                            "answer",
                            "sign",
                            "approve"
                          ]
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "started_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "completion_evidence": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {}
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "cancellation_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_id",
                        "title",
                        "status",
                        "proposed_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/tasks/{task_id}/decision": {
      "post": {
        "operationId": "decide_task",
        "summary": "Decide Proposed Task",
        "description": "Accepts or rejects a proposed Task on explicit user intent.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Task ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "accept",
                      "reject"
                    ]
                  },
                  "decision_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "assignee_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "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}$"
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                },
                "required": [
                  "expected_revision",
                  "decision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Task ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID the Task is for. Null for a Task in a Room without a Business."
                        },
                        "room_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room the Task is in. Tasks in a Room follow the Room's access."
                        },
                        "goal_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "ready",
                            "in_progress",
                            "completed",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "proposal_source": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "system"
                          ]
                        },
                        "proposal_source_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "proposed_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "proposal_reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "proposal_evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "decision_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "assignee_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "assignee_email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "todo",
                            "request",
                            "upload",
                            "connect",
                            "answer",
                            "sign",
                            "approve"
                          ]
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "started_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "completion_evidence": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {}
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "cancellation_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_id",
                        "title",
                        "status",
                        "proposed_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/tasks/{task_id}/completion": {
      "post": {
        "operationId": "complete_task",
        "summary": "Complete Task",
        "description": "Completes an accepted Task with completion evidence.",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "SMB-Workspace-Id",
            "in": "header",
            "required": true,
            "description": "Workspace where this operation runs. Required for user tokens and Workspace API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "description": "Stable Task ID."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "completion_evidence": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {}
                  }
                },
                "required": [
                  "expected_revision",
                  "completion_evidence"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "pattern": "^tsk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable Task ID."
                        },
                        "business_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Stable SMB Business ID the Task is for. Null for a Task in a Room without a Business."
                        },
                        "room_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                          "description": "Room the Task is in. Tasks in a Room follow the Room's access."
                        },
                        "goal_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "ready",
                            "in_progress",
                            "completed",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "proposal_source": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "system"
                          ]
                        },
                        "proposal_source_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "proposed_by": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "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}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        "proposal_reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "proposal_evidence": {
                          "type": "array",
                          "items": {}
                        },
                        "decision_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "assignee_user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "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}$"
                        },
                        "assignee_email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "todo",
                            "request",
                            "upload",
                            "connect",
                            "answer",
                            "sign",
                            "approve"
                          ]
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "started_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "completion_evidence": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {}
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "cancellation_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 4000
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "task_id",
                        "title",
                        "status",
                        "proposed_by",
                        "revision",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "receipt": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "command_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string"
                        },
                        "workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "receipt_id",
                        "command_id",
                        "operation",
                        "workspace_id"
                      ]
                    },
                    "idempotent_replay": {
                      "type": "boolean"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "receipt",
                    "idempotent_replay",
                    "request_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not authorized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The resource revision or idempotency input conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The request must be JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Required evidence is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; honor Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A dependency returned an invalid response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id",
                        "details"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-smb-exposure": "Workspace"
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "get_current_identity",
        "summary": "Get current access",
        "description": "Returns every active Workspace membership for a signed-in user, or the one pinned Workspace for a Workspace API key. No Workspace selector is required.",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "supabaseBearer": []
          },
          {
            "workspaceApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current authenticated identity and available Workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The current identity, Workspace memberships, and credential environment."
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required."
          },
          "503": {
            "description": "Workspace data is temporarily unavailable."
          }
        },
        "x-smb-exposure": "Workspace"
      }
    }
  },
  "components": {
    "schemas": {
      "smb.v0.objects.error": {
        "$id": "https://api.smb.co/v1/schemas/components/error",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "errors": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                }
              },
              "required": [
                "path",
                "code",
                "message"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "instance": {
            "format": "uri-reference",
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "maximum": 599,
            "minimum": 400,
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "request_id"
        ],
        "title": "Error",
        "type": "object"
      },
      "smb.v0.operations.archive_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "list_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/archive_list/request",
        "title": "Archive a List Request"
      },
      "smb.v0.operations.archive_list.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.archive_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.archive_list.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.archive_list_column.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              "column_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)$"
              }
            },
            "required": [
              "list_id",
              "column_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/archive_list_column/request",
        "title": "Archive a List column Request"
      },
      "smb.v0.operations.archive_list_column.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.archive_list_column.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.archive_list_column.request/properties/path/properties/column_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)$"
      },
      "smb.v0.operations.archive_list_column.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.check_api_health.response": {
        "$id": "https://api.smb.co/v1/schemas/operations/check_api_health/response",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "environment": {
            "enum": [
              "development",
              "preview",
              "production"
            ],
            "type": "string"
          },
          "request_id": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "schema_hash": {
            "$ref": "#/components/schemas/smb_v0_operations_check_api_health_response.__local.Digest"
          },
          "schema_version": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "service": {
            "const": "smb-system-of-record",
            "type": "string"
          },
          "status": {
            "const": "ok",
            "type": "string"
          }
        },
        "required": [
          "environment",
          "request_id",
          "schema_hash",
          "schema_version",
          "service",
          "status"
        ],
        "title": "Check API Health Response",
        "type": "object"
      },
      "smb.v0.operations.create_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "definition": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "string",
                        "const": "smb.list.v1"
                      },
                      "subject_type": {
                        "type": "string",
                        "const": "business"
                      },
                      "rule": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema0"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema2"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema3"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema4"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema6"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema8"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "group"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "all",
                                      "any"
                                    ]
                                  },
                                  "rules": {
                                    "minItems": 1,
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema10"
                                    }
                                  }
                                },
                                "required": [
                                  "kind",
                                  "operator",
                                  "rules"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "not"
                                  },
                                  "rule": {
                                    "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema10"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "rule"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "subject_type",
                      "rule"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "string",
                        "const": "smb.list.v1"
                      },
                      "subject_type": {
                        "type": "string",
                        "const": "person"
                      },
                      "rule": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema14"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema15"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "group"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "all",
                                      "any"
                                    ]
                                  },
                                  "rules": {
                                    "minItems": 1,
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema16"
                                    }
                                  }
                                },
                                "required": [
                                  "kind",
                                  "operator",
                                  "rules"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "not"
                                  },
                                  "rule": {
                                    "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema16"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "rule"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "subject_type",
                      "rule"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "required": [
              "name",
              "definition"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/create_list/request",
        "title": "Create a List Request"
      },
      "smb.v0.operations.create_list.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.create_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.create_list_column.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "list_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "value_type": {
                "type": "string",
                "enum": [
                  "text",
                  "number",
                  "boolean",
                  "date"
                ]
              },
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "name",
              "value_type",
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/create_list_column/request",
        "title": "Add a private List column Request"
      },
      "smb.v0.operations.create_list_column.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.create_list_column.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.create_list_column.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.create_person.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "display_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "business_id": {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "display_name"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/create_person/request",
        "title": "Create a private Person Request"
      },
      "smb.v0.operations.create_person.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.create_person.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.create_valuation_intake.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "pattern": "\\S",
                "x-http-name": "Idempotency-Key"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "idempotency_key",
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "business_id": {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "description": "Existing canonical Business to receive this valuation intake. Current Edit access is required."
              },
              "source": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "default": "api",
                "description": "Bounded attribution for the intake source."
              },
              "business": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "pattern": "\\S"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "address": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "formatted": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "street": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "state": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "postal_code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 80
                      },
                      "lat": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 90
                      },
                      "lon": {
                        "type": "number",
                        "minimum": -180,
                        "maximum": 180
                      }
                    }
                  }
                },
                "required": [
                  "name"
                ]
              },
              "contact": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "relationship": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "employee",
                      "advisor",
                      "potential_buyer",
                      "other"
                    ]
                  },
                  "relationship_other": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "\\S"
                  },
                  "consent_to_store": {
                    "const": true
                  },
                  "consent_version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "email",
                  "relationship",
                  "consent_to_store",
                  "consent_version"
                ],
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "relationship": {
                          "const": "other"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "relationship_other"
                      ]
                    },
                    "else": {
                      "not": {
                        "required": [
                          "relationship_other"
                        ]
                      }
                    }
                  }
                ]
              },
              "valuation_input": {
                "type": "object",
                "properties": {
                  "valuation_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "currency": {
                    "default": "USD",
                    "type": "string",
                    "enum": [
                      "USD"
                    ],
                    "description": "Value v1.16 currently accepts USD only. Other currencies must be converted before valuation."
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Optional caller-defined label returned as reference so the result can be matched to the caller's workflow."
                  },
                  "valuation_context": {
                    "default": {
                      "purpose": "screening",
                      "standard": "unspecified",
                      "premise": "going_concern",
                      "transaction_type": "unspecified",
                      "ownership_basis": "unspecified"
                    },
                    "type": "object",
                    "properties": {
                      "purpose": {
                        "default": "screening",
                        "type": "string",
                        "enum": [
                          "screening",
                          "sale_or_purchase",
                          "lending",
                          "financial_reporting",
                          "tax",
                          "litigation",
                          "internal_planning",
                          "other"
                        ]
                      },
                      "standard": {
                        "default": "unspecified",
                        "type": "string",
                        "enum": [
                          "unspecified",
                          "fair_market_value",
                          "investment_value",
                          "fair_value",
                          "liquidation_value",
                          "other"
                        ]
                      },
                      "premise": {
                        "default": "going_concern",
                        "type": "string",
                        "enum": [
                          "going_concern",
                          "orderly_liquidation",
                          "forced_liquidation"
                        ]
                      },
                      "transaction_type": {
                        "default": "unspecified",
                        "type": "string",
                        "enum": [
                          "unspecified",
                          "asset_sale",
                          "equity_sale"
                        ]
                      },
                      "ownership_basis": {
                        "default": "unspecified",
                        "type": "string",
                        "enum": [
                          "unspecified",
                          "controlling",
                          "minority"
                        ]
                      },
                      "lending_context": {
                        "type": "object",
                        "properties": {
                          "sba_loan_number_date": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          "transaction_category": {
                            "default": "unspecified",
                            "type": "string",
                            "enum": [
                              "unspecified",
                              "initial_acquisition",
                              "business_expansion",
                              "owner_buyout",
                              "esop_or_cooperative"
                            ]
                          },
                          "business_purchase_price": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "additional_equity_above_valuation": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "debt_service_coverage_ratio": {
                            "type": "number",
                            "minimum": 0
                          },
                          "amount_financed_excluding_appraised_real_estate_and_equipment": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "related_party_transaction": {
                            "type": "boolean"
                          },
                          "special_purpose_property": {
                            "type": "boolean"
                          },
                          "lender_requested_valuation": {
                            "type": "boolean"
                          },
                          "valuation_prepared_for_lender": {
                            "type": "boolean"
                          },
                          "valuation_scope_identifies_included_assets_and_assumed_debt": {
                            "type": "boolean"
                          },
                          "valuation_conclusion_signed": {
                            "type": "boolean"
                          },
                          "qualified_source_engaged": {
                            "type": "boolean"
                          },
                          "qualified_source_credential": {
                            "default": "unspecified",
                            "type": "string",
                            "enum": [
                              "unspecified",
                              "asa",
                              "cba",
                              "abv",
                              "cva",
                              "bca",
                              "certified_general_real_property_appraiser",
                              "other"
                            ]
                          },
                          "qualified_source_independent": {
                            "type": "boolean"
                          },
                          "seller_financials_verified_against_irs_transcripts": {
                            "type": "boolean"
                          },
                          "quality_of_earnings_obtained": {
                            "type": "boolean"
                          },
                          "quality_of_earnings_cash_proof_complete": {
                            "type": "boolean"
                          },
                          "quality_of_earnings_used_for_debt_service_coverage": {
                            "type": "boolean"
                          },
                          "sba_program": {
                            "type": "string",
                            "enum": [
                              "7a",
                              "504",
                              "other_sba",
                              "not_sba"
                            ]
                          },
                          "esop_transaction": {
                            "type": "boolean"
                          },
                          "erisa_valuation_obtained": {
                            "type": "boolean"
                          },
                          "erisa_valuation_independent": {
                            "type": "boolean"
                          },
                          "erisa_valuation_evidence_present": {
                            "type": "boolean"
                          },
                          "seller_financials_irs_reconciliation_status": {
                            "type": "string",
                            "enum": [
                              "matched",
                              "conflict",
                              "not_available"
                            ]
                          },
                          "quality_of_earnings_financial_reconciliation_complete": {
                            "type": "boolean"
                          },
                          "purchase_agreement_price": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "owner_occupied_commercial_real_estate_appraised_value": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "business_acquisition_debt_amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "global_debt_service_coverage_ratio": {
                            "type": "number",
                            "minimum": 0
                          },
                          "land_equity_contributed": {
                            "type": "boolean"
                          },
                          "third_party_lender_owned_real_estate": {
                            "type": "boolean"
                          },
                          "seller_carryback_counts_as_borrower_contribution": {
                            "type": "boolean"
                          },
                          "lender_requires_real_estate_appraisal": {
                            "type": "boolean"
                          },
                          "fixed_asset_value": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "fixed_asset_net_book_value": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false,
                    "description": "Optional purpose, standard, premise, transaction, ownership, and SBA lending context. Screening defaults apply when omitted."
                  },
                  "portfolio_adjustments": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "adjustment_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "operation": {
                          "type": "string",
                          "enum": [
                            "add",
                            "subtract"
                          ]
                        },
                        "amount": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 90071992547409.9
                        },
                        "provenance": {
                          "type": "object",
                          "properties": {
                            "source_type": {
                              "type": "string",
                              "enum": [
                                "owner_input",
                                "advisor_input",
                                "lender_input",
                                "user_scenario",
                                "market_comparable",
                                "appraisal",
                                "public_dataset",
                                "internal_benchmark",
                                "model_policy",
                                "financial_statement",
                                "tax_return",
                                "other"
                              ]
                            },
                            "source_name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "verification": {
                              "type": "string",
                              "enum": [
                                "verified",
                                "unverified",
                                "modeled"
                              ]
                            },
                            "observed_at": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "reference": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "note": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "source_type",
                            "source_name",
                            "verification"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "adjustment_id",
                        "label",
                        "operation",
                        "amount",
                        "provenance"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Optional portfolio-level additions or deductions with provenance."
                  },
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/smb_v0_operations_create_valuation_intake_request.__local.properties.body.BusinessReference"
                        },
                        {
                          "$ref": "#/components/schemas/smb_v0_operations_create_valuation_intake_request.__local.properties.body.AssetInput"
                        }
                      ]
                    },
                    "description": "One or more businesses or assets to value. There is no fixed item-count limit. The encoded request must be no larger than 8 MiB and Value rejects normalized workloads above 15,000 structural work units. Use business_id for a Business SMB already knows; otherwise send type and whatever details are available."
                  },
                  "combine_as_portfolio": {
                    "type": "boolean",
                    "default": false,
                    "description": "Required as true when items contains more than one entry, confirming that the entries should be valued together as one portfolio."
                  }
                },
                "required": [
                  "items"
                ],
                "additionalProperties": false,
                "description": "Identify an existing SMB Business or describe any business, real estate, equipment, brand, customer book, or mixed portfolio using only the facts available. SMB Value selects applicable methods and returns a compact result for every item plus a portfolio Bestimate, range, evidence support, missing information, and review flags.",
                "examples": [
                  {
                    "reference": "owner-operated-hvac-business",
                    "valuation_context": {
                      "purpose": "sale_or_purchase",
                      "standard": "fair_market_value",
                      "premise": "going_concern",
                      "transaction_type": "asset_sale",
                      "ownership_basis": "controlling"
                    },
                    "items": [
                      {
                        "asset_id": "hvac-business",
                        "type": "business",
                        "name": "Sample HVAC Services",
                        "details": {
                          "naics_code": "238220",
                          "employee_count": 18,
                          "owner_operated": true,
                          "annual_revenue": 2800000,
                          "sde": 520000,
                          "ebitda": 410000,
                          "adjusted_assets": 310000,
                          "liabilities": 85000,
                          "stable_earnings": true,
                          "business_real_estate_earnings_basis": "not_applicable"
                        }
                      }
                    ]
                  },
                  {
                    "reference": "two-location-coffee-franchise",
                    "combine_as_portfolio": true,
                    "items": [
                      {
                        "asset_id": "coffee-unit-columbus",
                        "type": "business",
                        "name": "Sample Coffee - Columbus",
                        "details": {
                          "naics_code": "722515",
                          "employee_count": 12,
                          "annual_revenue": 1450000,
                          "sde": 255000,
                          "ebitda": 205000,
                          "business_real_estate_earnings_basis": "market_rent_reflected"
                        },
                        "portfolio_treatment": {
                          "mode": "include",
                          "ownership_fraction": 1
                        }
                      },
                      {
                        "asset_id": "coffee-cre-columbus",
                        "type": "commercial_real_estate",
                        "name": "Sample Coffee Property - Columbus",
                        "details": {
                          "net_operating_income": 112000
                        },
                        "portfolio_treatment": {
                          "mode": "include",
                          "ownership_fraction": 1
                        }
                      },
                      {
                        "asset_id": "coffee-unit-dayton",
                        "type": "business",
                        "name": "Sample Coffee - Dayton",
                        "details": {
                          "naics_code": "722515",
                          "employee_count": 10,
                          "annual_revenue": 1180000,
                          "sde": 202000,
                          "ebitda": 158000,
                          "business_real_estate_earnings_basis": "market_rent_reflected"
                        },
                        "portfolio_treatment": {
                          "mode": "include",
                          "ownership_fraction": 1
                        }
                      },
                      {
                        "asset_id": "coffee-cre-dayton",
                        "type": "commercial_real_estate",
                        "name": "Sample Coffee Property - Dayton",
                        "details": {
                          "net_operating_income": 94000
                        },
                        "portfolio_treatment": {
                          "mode": "include",
                          "ownership_fraction": 1
                        }
                      }
                    ]
                  }
                ]
              }
            },
            "required": [
              "business_id",
              "business",
              "contact",
              "valuation_input"
            ]
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/create_valuation_intake/request",
        "title": "Create a valuation intake request"
      },
      "smb.v0.operations.create_valuation_intake.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "pattern": "\\S",
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.create_valuation_intake.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.create_workspace.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "description": "A caller-generated key. Keep it stable when retrying the same creation request.",
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "\\S",
                "description": "The display name for the new Workspace. Length is measured on the submitted value in Unicode code points; leading and trailing whitespace is removed before storage.",
                "example": "Acme Advisors"
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/create_workspace/request",
        "title": "Create Workspace Request"
      },
      "smb.v0.operations.create_workspace.request/properties/body": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "\\S",
            "description": "The display name for the new Workspace. Length is measured on the submitted value in Unicode code points; leading and trailing whitespace is removed before storage.",
            "example": "Acme Advisors"
          }
        },
        "required": [
          "name"
        ]
      },
      "smb.v0.operations.create_workspace.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "description": "A caller-generated key. Keep it stable when retrying the same creation request.",
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.create_workspace.response": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "workspace_type": {
                "type": "string",
                "const": "team"
              },
              "resource_type": {
                "type": "string",
                "const": "workspace"
              },
              "resource_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "const": "active"
              },
              "metadata": {
                "type": "object",
                "additionalProperties": true
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "id",
              "metadata",
              "name",
              "resource_id",
              "resource_type",
              "status",
              "workspace_type"
            ]
          },
          "owner_membership": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "role": {
                "type": "string",
                "const": "owner"
              },
              "status": {
                "type": "string",
                "const": "active"
              },
              "permissions": {
                "type": "object",
                "additionalProperties": true
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "id",
              "joined_at",
              "permissions",
              "role",
              "status",
              "user_id",
              "workspace_id"
            ]
          },
          "access": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "access_level": {
                "type": "string",
                "const": "full_access"
              }
            },
            "required": [
              "access_level"
            ]
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "original_request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "idempotent_replay": {
            "type": "boolean"
          }
        },
        "required": [
          "access",
          "idempotent_replay",
          "owner_membership",
          "request_id",
          "workspace"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/create_workspace/response",
        "title": "Create Workspace Response"
      },
      "smb.v0.operations.draft_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "subject_type": {
                "type": "string",
                "enum": [
                  "business",
                  "person"
                ]
              }
            },
            "required": [
              "prompt",
              "subject_type"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/draft_list/request",
        "title": "Draft a List Request"
      },
      "smb.v0.operations.draft_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_business.request": {
        "$id": "https://api.smb.co/v1/schemas/operations/get_business/request",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "additionalProperties": false,
            "properties": {},
            "required": [],
            "type": "object"
          },
          "path": {
            "additionalProperties": false,
            "properties": {
              "business_id": {
                "$ref": "#/components/schemas/smb_v0_operations_get_business_request.__local.OpaqueId"
              }
            },
            "required": [
              "business_id"
            ],
            "type": "object"
          },
          "query": {
            "additionalProperties": false,
            "properties": {
              "as_of": {
                "$ref": "#/components/schemas/smb_v0_operations_get_business_request.__local.Timestamp"
              },
              "effective_at": {
                "type": "string",
                "format": "date-time",
                "description": "Business-effective point. This never overrides the knowledge-time as_of cutoff."
              },
              "expand": {
                "items": {
                  "maxLength": 100,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 50,
                "type": "array",
                "uniqueItems": true
              },
              "fields": {
                "items": {
                  "maxLength": 100,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 200,
                "type": "array",
                "uniqueItems": true
              },
              "revision": {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              "workspace_id": {
                "$ref": "#/components/schemas/smb_v0_operations_get_business_request.__local.OpaqueId",
                "description": "Authenticated-only external Workspace identifier. Anonymous callers must omit this field."
              }
            },
            "required": [],
            "type": "object"
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "title": "Get Business Request",
        "type": "object"
      },
      "smb.v0.operations.get_business.request/properties/path/properties/business_id": {
        "$ref": "#/components/schemas/smb_v0_operations_get_business_request.__local.OpaqueId"
      },
      "smb.v0.operations.get_business.request/properties/query/properties/fields": {
        "items": {
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        "maxItems": 200,
        "type": "array",
        "uniqueItems": true
      },
      "smb.v0.operations.get_business.request/properties/query/properties/revision": {
        "maxLength": 200,
        "minLength": 1,
        "type": "string"
      },
      "smb.v0.operations.get_business.response": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "as_of": {
                "$ref": "#/components/schemas/smb_v0_operations_get_business_response.__local.Timestamp"
              },
              "data": {
                "$ref": "#/components/schemas/smb.v0.records.business.public"
              },
              "links": {
                "additionalProperties": {
                  "format": "uri-reference",
                  "type": "string"
                },
                "type": "object"
              },
              "projection": {
                "type": "string",
                "const": "public"
              },
              "request_id": {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              "schema_hash": {
                "$ref": "#/components/schemas/smb_v0_operations_get_business_response.__local.Digest"
              },
              "schema_version": {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              "effective_at": {
                "type": "string",
                "format": "date-time",
                "description": "Business-effective point used for this result when requested."
              }
            },
            "required": [
              "as_of",
              "data",
              "projection",
              "request_id",
              "schema_hash",
              "schema_version"
            ]
          }
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_business/response",
        "title": "Get Business Response"
      },
      "smb.v0.operations.get_business_comparables.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "business_id": {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "description": "Stable SMB Business ID."
              }
            },
            "required": [
              "business_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048,
                "pattern": "^[A-Za-z0-9_-]+$",
                "description": "Opaque cursor returned by the prior comparable page."
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 25,
                "default": 10
              }
            },
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_business_comparables/request",
        "title": "Get Business Comparables Request"
      },
      "smb.v0.operations.get_business_comparables.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_business_comparables.request/properties/path/properties/business_id": {
        "type": "string",
        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
        "description": "Stable SMB Business ID."
      },
      "smb.v0.operations.get_business_comparables.request/properties/query/properties/cursor": {
        "type": "string",
        "minLength": 1,
        "maxLength": 2048,
        "pattern": "^[A-Za-z0-9_-]+$",
        "description": "Opaque cursor returned by the prior comparable page."
      },
      "smb.v0.operations.get_business_comparables.request/properties/query/properties/limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 25,
        "default": 10
      },
      "smb.v0.operations.get_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "list_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_list/request",
        "title": "Get a List Request"
      },
      "smb.v0.operations.get_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_list.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.get_list_capabilities.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_list_capabilities/request",
        "title": "Get List filters Request"
      },
      "smb.v0.operations.get_list_capabilities.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_list_members.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "list_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "after": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "limit": {
                "default": 50,
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_list_members/request",
        "title": "Get List members Request"
      },
      "smb.v0.operations.get_list_members.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_list_members.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.get_list_members.request/properties/query/properties/after": {
        "type": "string",
        "minLength": 1,
        "maxLength": 4096
      },
      "smb.v0.operations.get_list_members.request/properties/query/properties/expected_version": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      },
      "smb.v0.operations.get_list_members.request/properties/query/properties/limit": {
        "default": 50,
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "smb.v0.operations.get_person.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "person_id": {
                "type": "string",
                "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "person_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_person/request",
        "title": "Get a private Person Request"
      },
      "smb.v0.operations.get_person.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_person.request/properties/path/properties/person_id": {
        "type": "string",
        "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.get_valuation.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "valuation_id": {
                "type": "string",
                "pattern": "^val_[0-9a-f]{32}$",
                "description": "Stable valuation ID."
              }
            },
            "required": [
              "valuation_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_valuation/request",
        "title": "Get Valuation Request"
      },
      "smb.v0.operations.get_valuation.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_valuation.request/properties/path/properties/valuation_id": {
        "type": "string",
        "pattern": "^val_[0-9a-f]{32}$",
        "description": "Stable valuation ID."
      },
      "smb.v0.operations.get_valuations.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "business_id": {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "description": "Stable SMB Business ID."
              }
            },
            "required": [
              "business_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048,
                "pattern": "^[A-Za-z0-9_-]+$",
                "description": "Opaque cursor returned by the prior page. Valuations are ordered oldest first."
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "default": 20
              }
            },
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/get_valuations/request",
        "title": "List Business Valuations Request"
      },
      "smb.v0.operations.get_valuations.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.get_valuations.request/properties/path/properties/business_id": {
        "type": "string",
        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
        "description": "Stable SMB Business ID."
      },
      "smb.v0.operations.get_valuations.request/properties/query/properties/cursor": {
        "type": "string",
        "minLength": 1,
        "maxLength": 2048,
        "pattern": "^[A-Za-z0-9_-]+$",
        "description": "Opaque cursor returned by the prior page. Valuations are ordered oldest first."
      },
      "smb.v0.operations.get_valuations.request/properties/query/properties/limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "default": 20
      },
      "smb.v0.operations.get_workspace.request": {
        "$id": "https://api.smb.co/v1/schemas/operations/get_workspace/request",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "additionalProperties": false,
            "properties": {},
            "required": [],
            "type": "object"
          },
          "path": {
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "$ref": "#/components/schemas/smb_v0_operations_get_workspace_request.__local.Uuid"
              }
            },
            "required": [
              "workspace_id"
            ],
            "type": "object"
          },
          "query": {
            "additionalProperties": false,
            "properties": {
              "as_of": {
                "$ref": "#/components/schemas/smb_v0_operations_get_workspace_request.__local.Timestamp"
              },
              "expand": {
                "items": {
                  "maxLength": 100,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 50,
                "type": "array",
                "uniqueItems": true
              },
              "fields": {
                "items": {
                  "enum": [
                    "created_at",
                    "id",
                    "name",
                    "slug",
                    "status"
                  ],
                  "type": "string"
                },
                "maxItems": 200,
                "type": "array",
                "uniqueItems": true
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "revision": {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [],
            "type": "object"
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "title": "Get Workspace Request",
        "type": "object"
      },
      "smb.v0.operations.get_workspace.request/properties/path/properties/workspace_id": {
        "$ref": "#/components/schemas/smb_v0_operations_get_workspace_request.__local.Uuid"
      },
      "smb.v0.operations.get_workspace.request/properties/query/properties/as_of": {
        "$ref": "#/components/schemas/smb_v0_operations_get_workspace_request.__local.Timestamp"
      },
      "smb.v0.operations.get_workspace.request/properties/query/properties/expand": {
        "items": {
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        "maxItems": 50,
        "type": "array",
        "uniqueItems": true
      },
      "smb.v0.operations.get_workspace.request/properties/query/properties/fields": {
        "items": {
          "enum": [
            "created_at",
            "id",
            "name",
            "slug",
            "status"
          ],
          "type": "string"
        },
        "maxItems": 200,
        "type": "array",
        "uniqueItems": true
      },
      "smb.v0.operations.get_workspace.request/properties/query/properties/id": {
        "format": "uuid",
        "type": "string"
      },
      "smb.v0.operations.get_workspace.request/properties/query/properties/revision": {
        "maxLength": 200,
        "minLength": 1,
        "type": "string"
      },
      "smb.v0.operations.get_workspace.response": {
        "$id": "https://api.smb.co/v1/schemas/operations/get_workspace/response",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "as_of": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.Timestamp"
          },
          "data": {
            "additionalProperties": false,
            "properties": {
              "archived_at": {
                "format": "date-time",
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "created_by_identity_id": {
                "format": "uuid",
                "type": "string"
              },
              "current_revision_id": {
                "format": "uuid",
                "type": "string"
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "public_id": {
                "type": "string"
              },
              "publication_evidence_id": {
                "format": "uuid",
                "type": "string"
              },
              "publication_status": {
                "enum": [
                  "private",
                  "published",
                  "suppressed"
                ],
                "type": "string"
              },
              "published_at": {
                "format": "date-time",
                "type": "string"
              },
              "published_by_identity_id": {
                "format": "uuid",
                "type": "string"
              },
              "record_type": {
                "type": "string"
              },
              "schema_version": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "active",
                  "closed",
                  "suspended"
                ],
                "type": "string"
              },
              "updated_at": {
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "created_at",
              "id",
              "name",
              "public_id",
              "publication_status",
              "record_type",
              "schema_version",
              "slug",
              "status",
              "updated_at"
            ],
            "type": "object"
          },
          "links": {
            "additionalProperties": {
              "format": "uri-reference",
              "type": "string"
            },
            "type": "object"
          },
          "projection": {
            "const": "workspace",
            "type": "string"
          },
          "provenance": {
            "items": {
              "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.SourceRef"
            },
            "type": "array"
          },
          "request_id": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "revision": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.RevisionRef"
          },
          "schema_hash": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.Digest"
          },
          "schema_version": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "data",
          "projection",
          "request_id",
          "schema_hash",
          "schema_version"
        ],
        "title": "Get Workspace Response",
        "type": "object"
      },
      "smb.v0.operations.list_lists.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "after": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "limit": {
                "default": 50,
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "status": {
                "default": "active",
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "subject_type": {
                "type": "string",
                "enum": [
                  "business",
                  "person"
                ]
              }
            },
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/list_lists/request",
        "title": "Find Lists Request"
      },
      "smb.v0.operations.list_lists.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.list_lists.request/properties/query/properties/after": {
        "type": "string",
        "minLength": 1,
        "maxLength": 4096
      },
      "smb.v0.operations.list_lists.request/properties/query/properties/limit": {
        "default": 50,
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "smb.v0.operations.list_lists.request/properties/query/properties/status": {
        "default": "active",
        "type": "string",
        "enum": [
          "active",
          "archived"
        ]
      },
      "smb.v0.operations.list_lists.request/properties/query/properties/subject_type": {
        "type": "string",
        "enum": [
          "business",
          "person"
        ]
      },
      "smb.v0.operations.preview_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "definition": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "string",
                        "const": "smb.list.v1"
                      },
                      "subject_type": {
                        "type": "string",
                        "const": "business"
                      },
                      "rule": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema0"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema2"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema3"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema4"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema6"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema8"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "group"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "all",
                                      "any"
                                    ]
                                  },
                                  "rules": {
                                    "minItems": 1,
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema10"
                                    }
                                  }
                                },
                                "required": [
                                  "kind",
                                  "operator",
                                  "rules"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "not"
                                  },
                                  "rule": {
                                    "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema10"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "rule"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "subject_type",
                      "rule"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "string",
                        "const": "smb.list.v1"
                      },
                      "subject_type": {
                        "type": "string",
                        "const": "person"
                      },
                      "rule": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema14"
                              },
                              {
                                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema15"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "group"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "all",
                                      "any"
                                    ]
                                  },
                                  "rules": {
                                    "minItems": 1,
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema16"
                                    }
                                  }
                                },
                                "required": [
                                  "kind",
                                  "operator",
                                  "rules"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "not"
                                  },
                                  "rule": {
                                    "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema16"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "rule"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "subject_type",
                      "rule"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "page": {
                "default": {
                  "limit": 50
                },
                "type": "object",
                "properties": {
                  "after": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "limit": {
                    "default": 50,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "required": [
              "definition"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/preview_list/request",
        "title": "Preview a List Request"
      },
      "smb.v0.operations.preview_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.refine_valuation.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "pattern": "\\S",
                "x-http-name": "Idempotency-Key"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "idempotency_key",
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "valuation_id": {
                "type": "string",
                "pattern": "^val_[0-9a-f]{32}$",
                "description": "Stable valuation ID."
              }
            },
            "required": [
              "valuation_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "business_id": {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "description": "Stable SMB Business ID."
              },
              "answers": {
                "type": "array",
                "minItems": 1,
                "maxItems": 64,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "question_id": {
                      "type": "string",
                      "pattern": "^vquestion_[0-9a-f]{32}_(?:p|i[1-9][0-9]*)_[1-9][0-9]*$",
                      "description": "Stable immutable question ID from the selected predecessor valuation."
                    },
                    "value": {},
                    "selector": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "item_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "period_end": {
                          "type": "string",
                          "format": "date"
                        },
                        "period_type": {
                          "type": "string",
                          "enum": [
                            "annual",
                            "ltm",
                            "interim"
                          ]
                        },
                        "adjustment_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        }
                      }
                    }
                  },
                  "required": [
                    "question_id",
                    "value"
                  ]
                }
              }
            },
            "required": [
              "answers",
              "business_id"
            ]
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/refine_valuation/request",
        "title": "Answer valuation questions request"
      },
      "smb.v0.operations.refine_valuation.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "pattern": "\\S",
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.refine_valuation.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.refine_valuation.request/properties/path/properties/valuation_id": {
        "type": "string",
        "pattern": "^val_[0-9a-f]{32}$",
        "description": "Stable valuation ID."
      },
      "smb.v0.operations.restore_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "list_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/restore_list/request",
        "title": "Restore a List Request"
      },
      "smb.v0.operations.restore_list.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.restore_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.restore_list.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.run_valuation.http_response": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "schema_version": {
                "const": "smb.value.result.v2"
              },
              "valuation_id": {
                "type": "string",
                "pattern": "^val_[0-9a-f]{32}$"
              },
              "model_release": {
                "type": "string",
                "pattern": "^smb\\.value\\.engine\\.v1\\.17\\.(?:0|[1-9][0-9]*)$",
                "maxLength": 200
              },
              "valuation_date": {
                "type": "string",
                "format": "date"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "reference": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scope": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "screening",
                      "sale_or_purchase",
                      "lending",
                      "financial_reporting",
                      "tax",
                      "litigation",
                      "internal_planning",
                      "other"
                    ]
                  },
                  "standard": {
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "fair_market_value",
                      "investment_value",
                      "fair_value",
                      "liquidation_value",
                      "other"
                    ]
                  },
                  "premise": {
                    "type": "string",
                    "enum": [
                      "going_concern",
                      "orderly_liquidation",
                      "forced_liquidation"
                    ]
                  },
                  "transaction_type": {
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "asset_sale",
                      "equity_sale"
                    ]
                  },
                  "ownership_basis": {
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "controlling",
                      "minority"
                    ]
                  }
                },
                "required": [
                  "purpose",
                  "standard",
                  "premise",
                  "transaction_type",
                  "ownership_basis"
                ]
              },
              "benchmark_snapshot_id": {
                "type": "string",
                "pattern": "^bm_[0-9a-f]{16}$"
              },
              "portfolio": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "valued",
                      "incomplete"
                    ]
                  },
                  "conclusion": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "amount": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "range": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "low": {
                                    "type": "number"
                                  },
                                  "high": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "low",
                                  "high"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value_basis": {
                            "type": "string",
                            "enum": [
                              "asset_value",
                              "enterprise_value",
                              "equity_value",
                              "mixed_transaction_value",
                              "unspecified"
                            ]
                          }
                        },
                        "required": [
                          "amount",
                          "currency",
                          "range",
                          "value_basis"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evidence_strength": {
                    "type": "string",
                    "enum": [
                      "insufficient",
                      "limited",
                      "supported",
                      "strong"
                    ]
                  },
                  "permitted_use": {
                    "type": "string",
                    "enum": [
                      "withheld",
                      "screening_only",
                      "decision_support_with_review",
                      "expert_review_candidate"
                    ]
                  },
                  "analysis_maturity": {
                    "type": "string",
                    "enum": [
                      "synthetic_screening",
                      "screening"
                    ]
                  },
                  "reconciliation_status": {
                    "type": "string",
                    "enum": [
                      "not_available",
                      "consistent",
                      "divergent"
                    ]
                  },
                  "material_gaps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                        },
                        "affected_items": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "code",
                        "affected_items",
                        "message"
                      ]
                    }
                  },
                  "next_questions": {
                    "type": "array",
                    "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                    "maxItems": 5,
                    "items": {
                      "type": "object",
                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                      "additionalProperties": false,
                      "properties": {
                        "question_id": {
                          "type": "string",
                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                        },
                        "rank": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 5
                        },
                        "question": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "improves": {
                          "type": "string",
                          "enum": [
                            "subject_scope",
                            "financial_normalization",
                            "valuation_basis",
                            "method_fit",
                            "assumption_support",
                            "risk"
                          ]
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "answer_paths": {
                          "type": "array",
                          "minItems": 1,
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "valuation_context.lending_context.sba_loan_number_date",
                              "valuation_context.lending_context.qualified_source_engaged",
                              "valuation_context.lending_context.qualified_source_credential",
                              "valuation_context.lending_context.qualified_source_independent",
                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                              "valuation_context.lending_context.lender_requested_valuation",
                              "valuation_context.lending_context.valuation_prepared_for_lender",
                              "valuation_context.transaction_type",
                              "valuation_context.ownership_basis",
                              "items[].type",
                              "items[].description",
                              "items[].portfolio_treatment",
                              "items[].details.projection_period_unit",
                              "items[].details.cash_flow_basis",
                              "items[].details.owner_labor",
                              "items[].details.sde",
                              "items[].details.ebitda",
                              "items[].details.financial_history",
                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                              "items[].details.capital_structure",
                              "items[].details.business_real_estate_earnings_basis",
                              "items[].market_comparables",
                              "portfolio_adjustments[].provenance",
                              "valuation_context.lending_context.sba_program",
                              "valuation_context.lending_context.transaction_category",
                              "valuation_context.lending_context.esop_transaction",
                              "valuation_context.lending_context.erisa_valuation_obtained",
                              "valuation_context.lending_context.erisa_valuation_independent",
                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                              "valuation_context.lending_context.purchase_agreement_price",
                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                              "valuation_context.lending_context.business_purchase_price",
                              "valuation_context.lending_context.business_acquisition_debt_amount",
                              "valuation_context.lending_context.debt_service_coverage_ratio",
                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                              "valuation_context.lending_context.land_equity_contributed",
                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                              "valuation_context.lending_context.fixed_asset_value",
                              "valuation_context.lending_context.fixed_asset_net_book_value",
                              "items[].details.project_property_estimated_value",
                              "items[].details.appraised_value",
                              "items[].assumptions.capitalization_rate"
                            ]
                          }
                        }
                      },
                      "required": [
                        "rank",
                        "question",
                        "improves"
                      ]
                    }
                  },
                  "lending_readiness": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "not_requested",
                          "screening_ready",
                          "needs_information"
                        ]
                      },
                      "policy_reference": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "status",
                      "policy_reference"
                    ]
                  }
                },
                "required": [
                  "status",
                  "conclusion",
                  "evidence_strength",
                  "permitted_use",
                  "analysis_maturity",
                  "reconciliation_status",
                  "material_gaps",
                  "lending_readiness"
                ]
              },
              "results": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "item_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "business",
                        "commercial_real_estate",
                        "brand",
                        "customer_relationships",
                        "intangible",
                        "equipment",
                        "inventory",
                        "other"
                      ]
                    },
                    "name": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "valued",
                        "abstained"
                      ]
                    },
                    "conclusion": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "amount": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "range": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "low": {
                                      "type": "number"
                                    },
                                    "high": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "low",
                                    "high"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "value_basis": {
                              "type": "string",
                              "enum": [
                                "asset_value",
                                "enterprise_value",
                                "equity_value",
                                "mixed_transaction_value",
                                "unspecified"
                              ]
                            }
                          },
                          "required": [
                            "amount",
                            "currency",
                            "range",
                            "value_basis"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primary_methodology": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "family": {
                              "type": "string",
                              "enum": [
                                "income",
                                "market",
                                "asset",
                                "intangible_asset"
                              ]
                            },
                            "rationale_codes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "caller_selected_method",
                                  "best_supported_method",
                                  "cash_flow_supported",
                                  "asset_evidence_supported",
                                  "market_evidence_supported",
                                  "revenue_screening_only",
                                  "asset_specific_method"
                                ]
                              }
                            },
                            "rationale": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "name",
                            "family",
                            "rationale_codes",
                            "rationale"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "alternatives": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "methodology": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "indicated_value": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "oneOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value_basis": {
                            "type": "string",
                            "enum": [
                              "asset_value",
                              "enterprise_value",
                              "equity_value",
                              "mixed_transaction_value",
                              "unspecified"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "calculated",
                              "abstained"
                            ]
                          },
                          "warning_codes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "insufficient_inputs",
                                "input_reconciliation_required",
                                "future_dated_evidence_excluded",
                                "stale_evidence",
                                "provisional_assumption",
                                "comparable_evidence_review",
                                "nonpositive_economics",
                                "method_review_required"
                              ]
                            }
                          }
                        },
                        "required": [
                          "methodology",
                          "indicated_value",
                          "currency",
                          "value_basis",
                          "status",
                          "warning_codes"
                        ]
                      }
                    },
                    "method_comparison": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "methods_considered": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "reconciliation_status": {
                          "type": "string",
                          "enum": [
                            "not_available",
                            "consistent",
                            "divergent"
                          ]
                        }
                      },
                      "required": [
                        "methods_considered",
                        "reconciliation_status"
                      ]
                    },
                    "evidence_summary": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "evidence_strength": {
                          "type": "string",
                          "enum": [
                            "insufficient",
                            "limited",
                            "supported",
                            "strong"
                          ]
                        },
                        "permitted_use": {
                          "type": "string",
                          "enum": [
                            "withheld",
                            "screening_only",
                            "decision_support_with_review",
                            "expert_review_candidate"
                          ]
                        },
                        "analysis_maturity": {
                          "type": "string",
                          "enum": [
                            "synthetic_screening",
                            "screening"
                          ]
                        },
                        "financials_status": {
                          "type": "string",
                          "enum": [
                            "not_provided",
                            "normalized",
                            "no_eligible_period"
                          ]
                        },
                        "selected_period": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periods_supplied": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "earnings_trend": {
                          "type": "string",
                          "enum": [
                            "insufficient_history",
                            "improving",
                            "declining",
                            "mixed",
                            "flat"
                          ]
                        },
                        "input_fields_used": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "annual_revenue",
                              "cash_flow",
                              "cash_flows",
                              "disposal_costs",
                              "ebitda",
                              "employee_count",
                              "gross_asset_value",
                              "net_operating_income",
                              "replacement_cost",
                              "royalty_base",
                              "sde",
                              "total_assets",
                              "total_liabilities"
                            ]
                          }
                        },
                        "benchmark_support": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "resolution": {
                              "type": "string",
                              "enum": [
                                "not_applicable",
                                "exact",
                                "inferred",
                                "withheld"
                              ]
                            },
                            "evidence_class": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "observed",
                                    "derived",
                                    "modeled"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "as_of": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "geography": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_families": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "U.S. Census Bureau"
                                ]
                              }
                            }
                          },
                          "required": [
                            "resolution",
                            "evidence_class",
                            "as_of",
                            "geography",
                            "source_families"
                          ]
                        }
                      },
                      "required": [
                        "evidence_strength",
                        "permitted_use",
                        "analysis_maturity",
                        "financials_status",
                        "selected_period",
                        "periods_supplied",
                        "earnings_trend",
                        "input_fields_used",
                        "benchmark_support"
                      ]
                    },
                    "uncertainty": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "range": {
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "low": {
                                  "type": "number"
                                },
                                "high": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "low",
                                "high"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "const": "modeled_sensitivity_range"
                        },
                        "driver_categories": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "operating_performance",
                              "market_assumptions",
                              "asset_economics",
                              "valuation_assumptions"
                            ]
                          }
                        }
                      },
                      "required": [
                        "range",
                        "label",
                        "driver_categories"
                      ]
                    },
                    "material_gaps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,99}$"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ]
                      }
                    },
                    "next_questions": {
                      "type": "array",
                      "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                      "maxItems": 5,
                      "items": {
                        "type": "object",
                        "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                        "additionalProperties": false,
                        "properties": {
                          "question_id": {
                            "type": "string",
                            "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                            "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                          },
                          "rank": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 5
                          },
                          "question": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "improves": {
                            "type": "string",
                            "enum": [
                              "subject_scope",
                              "financial_normalization",
                              "valuation_basis",
                              "method_fit",
                              "assumption_support",
                              "risk"
                            ]
                          },
                          "why": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "answer_paths": {
                            "type": "array",
                            "minItems": 1,
                            "uniqueItems": true,
                            "items": {
                              "type": "string",
                              "enum": [
                                "valuation_context.lending_context.sba_loan_number_date",
                                "valuation_context.lending_context.qualified_source_engaged",
                                "valuation_context.lending_context.qualified_source_credential",
                                "valuation_context.lending_context.qualified_source_independent",
                                "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                "valuation_context.lending_context.lender_requested_valuation",
                                "valuation_context.lending_context.valuation_prepared_for_lender",
                                "valuation_context.transaction_type",
                                "valuation_context.ownership_basis",
                                "items[].type",
                                "items[].description",
                                "items[].portfolio_treatment",
                                "items[].details.projection_period_unit",
                                "items[].details.cash_flow_basis",
                                "items[].details.owner_labor",
                                "items[].details.sde",
                                "items[].details.ebitda",
                                "items[].details.financial_history",
                                "items[].details.financial_history[].normalization_adjustments[].provenance",
                                "items[].details.capital_structure",
                                "items[].details.business_real_estate_earnings_basis",
                                "items[].market_comparables",
                                "portfolio_adjustments[].provenance",
                                "valuation_context.lending_context.sba_program",
                                "valuation_context.lending_context.transaction_category",
                                "valuation_context.lending_context.esop_transaction",
                                "valuation_context.lending_context.erisa_valuation_obtained",
                                "valuation_context.lending_context.erisa_valuation_independent",
                                "valuation_context.lending_context.erisa_valuation_evidence_present",
                                "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                "valuation_context.lending_context.purchase_agreement_price",
                                "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                "valuation_context.lending_context.business_purchase_price",
                                "valuation_context.lending_context.business_acquisition_debt_amount",
                                "valuation_context.lending_context.debt_service_coverage_ratio",
                                "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                "valuation_context.lending_context.land_equity_contributed",
                                "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                "valuation_context.lending_context.fixed_asset_value",
                                "valuation_context.lending_context.fixed_asset_net_book_value",
                                "items[].details.project_property_estimated_value",
                                "items[].details.appraised_value",
                                "items[].assumptions.capitalization_rate"
                              ]
                            }
                          }
                        },
                        "required": [
                          "rank",
                          "question",
                          "improves"
                        ]
                      }
                    },
                    "lending_readiness": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_requested",
                            "screening_ready",
                            "needs_information"
                          ]
                        },
                        "policy_reference": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 200
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "policy_reference"
                      ]
                    }
                  },
                  "required": [
                    "item_id",
                    "type",
                    "name",
                    "status",
                    "conclusion",
                    "primary_methodology",
                    "alternatives",
                    "method_comparison",
                    "evidence_summary",
                    "uncertainty",
                    "material_gaps",
                    "next_questions",
                    "lending_readiness"
                  ]
                }
              },
              "item_count": {
                "type": "integer",
                "minimum": 1
              },
              "limitations": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "result_hash": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$",
                "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
              },
              "persistence": {
                "type": "object",
                "additionalProperties": false,
                "description": "Best-effort guest persistence. A completed valuation can be claimed after authentication; an unavailable status does not invalidate the computed valuation result.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "unavailable"
                    ],
                    "description": "Whether SMB saved this public valuation for a later claim."
                  },
                  "intake_id": {
                    "type": "string",
                    "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Saved guest intake. Present whenever status is completed."
                  },
                  "claim_token": {
                    "type": "string",
                    "pattern": "^vclaim_[0-9a-f]{64}$",
                    "readOnly": true,
                    "description": "One-time secret returned only by the first successful execution. Save it securely; an idempotent replay deliberately omits it.",
                    "x-smb-secret-once": true
                  }
                },
                "required": [
                  "status"
                ],
                "oneOf": [
                  {
                    "properties": {
                      "status": {
                        "const": "completed"
                      }
                    },
                    "required": [
                      "status",
                      "intake_id"
                    ]
                  },
                  {
                    "properties": {
                      "status": {
                        "const": "unavailable"
                      }
                    },
                    "required": [
                      "status"
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "intake_id"
                          ]
                        },
                        {
                          "required": [
                            "claim_token"
                          ]
                        }
                      ]
                    }
                  }
                ]
              }
            },
            "required": [
              "benchmark_snapshot_id",
              "currency",
              "item_count",
              "limitations",
              "model_release",
              "persistence",
              "portfolio",
              "reference",
              "result_hash",
              "results",
              "schema_version",
              "valuation_date",
              "valuation_id"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "schema_version": {
                "const": "smb.value.result.v2"
              },
              "valuation_id": {
                "type": "string",
                "pattern": "^val_[0-9a-f]{32}$"
              },
              "model_release": {
                "type": "string",
                "pattern": "^smb\\.value\\.engine\\.v(?:1\\.(?:2[3-9]|[3-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)|(?:[2-9]|[1-9][0-9]+)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*))$",
                "maxLength": 200
              },
              "valuation_date": {
                "type": "string",
                "format": "date"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "reference": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scope": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "screening",
                      "sale_or_purchase",
                      "lending",
                      "financial_reporting",
                      "tax",
                      "litigation",
                      "internal_planning",
                      "other"
                    ]
                  },
                  "standard": {
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "fair_market_value",
                      "investment_value",
                      "fair_value",
                      "liquidation_value",
                      "other"
                    ]
                  },
                  "premise": {
                    "type": "string",
                    "enum": [
                      "going_concern",
                      "orderly_liquidation",
                      "forced_liquidation"
                    ]
                  },
                  "transaction_type": {
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "asset_sale",
                      "equity_sale"
                    ]
                  },
                  "ownership_basis": {
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "controlling",
                      "minority"
                    ]
                  }
                },
                "required": [
                  "purpose",
                  "standard",
                  "premise",
                  "transaction_type",
                  "ownership_basis"
                ]
              },
              "benchmark_snapshot_id": {
                "type": "string",
                "pattern": "^bm_[0-9a-f]{16}$"
              },
              "portfolio": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "valued",
                      "incomplete"
                    ]
                  },
                  "conclusion": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "amount": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "range": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "low": {
                                    "type": "number"
                                  },
                                  "high": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "low",
                                  "high"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value_basis": {
                            "type": "string",
                            "enum": [
                              "asset_value",
                              "enterprise_value",
                              "equity_value",
                              "mixed_transaction_value",
                              "unspecified"
                            ]
                          }
                        },
                        "required": [
                          "amount",
                          "currency",
                          "range",
                          "value_basis"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evidence_strength": {
                    "type": "string",
                    "enum": [
                      "insufficient",
                      "limited",
                      "supported",
                      "strong"
                    ]
                  },
                  "permitted_use": {
                    "type": "string",
                    "enum": [
                      "withheld",
                      "screening_only",
                      "decision_support_with_review",
                      "expert_review_candidate"
                    ]
                  },
                  "analysis_maturity": {
                    "type": "string",
                    "enum": [
                      "synthetic_screening",
                      "screening"
                    ]
                  },
                  "reconciliation_status": {
                    "type": "string",
                    "enum": [
                      "not_available",
                      "consistent",
                      "divergent"
                    ]
                  },
                  "material_gaps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,99}$"
                        },
                        "affected_items": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "code",
                        "affected_items",
                        "message"
                      ]
                    }
                  },
                  "next_questions": {
                    "type": "array",
                    "description": "Portfolio-scoped questions. For a portfolio, inspect this list and every item result's next_questions list, collect answers in one conversation, then make one explicit run_valuation call if a revised result is wanted.",
                    "maxItems": 32,
                    "items": {
                      "type": "object",
                      "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                      "additionalProperties": false,
                      "properties": {
                        "question_id": {
                          "type": "string",
                          "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                          "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                        },
                        "rank": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 32
                        },
                        "question": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "improves": {
                          "type": "string",
                          "enum": [
                            "subject_scope",
                            "financial_normalization",
                            "valuation_basis",
                            "method_fit",
                            "assumption_support",
                            "risk"
                          ]
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "answer_paths": {
                          "type": "array",
                          "minItems": 1,
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "valuation_context.lending_context.sba_loan_number_date",
                              "valuation_context.lending_context.qualified_source_engaged",
                              "valuation_context.lending_context.qualified_source_credential",
                              "valuation_context.lending_context.qualified_source_independent",
                              "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                              "valuation_context.lending_context.lender_requested_valuation",
                              "valuation_context.lending_context.valuation_prepared_for_lender",
                              "valuation_context.transaction_type",
                              "valuation_context.ownership_basis",
                              "items[].type",
                              "items[].description",
                              "items[].portfolio_treatment",
                              "items[].details.projection_period_unit",
                              "items[].details.cash_flow_basis",
                              "items[].details.owner_labor",
                              "items[].details.sde",
                              "items[].details.ebitda",
                              "items[].details.financial_history",
                              "items[].details.financial_history[].normalization_adjustments[].provenance",
                              "items[].details.capital_structure",
                              "items[].details.business_real_estate_earnings_basis",
                              "items[].market_comparables",
                              "portfolio_adjustments[].provenance",
                              "valuation_context.lending_context.sba_program",
                              "valuation_context.lending_context.transaction_category",
                              "valuation_context.lending_context.esop_transaction",
                              "valuation_context.lending_context.erisa_valuation_obtained",
                              "valuation_context.lending_context.erisa_valuation_independent",
                              "valuation_context.lending_context.erisa_valuation_evidence_present",
                              "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                              "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                              "valuation_context.lending_context.purchase_agreement_price",
                              "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                              "valuation_context.lending_context.business_purchase_price",
                              "valuation_context.lending_context.business_acquisition_debt_amount",
                              "valuation_context.lending_context.debt_service_coverage_ratio",
                              "valuation_context.lending_context.global_debt_service_coverage_ratio",
                              "valuation_context.lending_context.land_equity_contributed",
                              "valuation_context.lending_context.third_party_lender_owned_real_estate",
                              "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                              "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                              "valuation_context.lending_context.fixed_asset_value",
                              "valuation_context.lending_context.fixed_asset_net_book_value",
                              "items[].details.project_property_estimated_value",
                              "items[].details.appraised_value",
                              "items[].assumptions.capitalization_rate"
                            ]
                          }
                        }
                      },
                      "required": [
                        "question_id",
                        "rank",
                        "question",
                        "improves",
                        "why",
                        "answer_paths"
                      ]
                    }
                  },
                  "lending_readiness": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "not_requested",
                          "screening_ready",
                          "needs_information"
                        ]
                      },
                      "sba_program": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "7a",
                              "504",
                              "other_sba",
                              "not_sba"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "policy_reference": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "policy_status": {
                        "type": "string",
                        "enum": [
                          "not_requested",
                          "program_missing",
                          "program_not_applicable",
                          "program_unsupported",
                          "policy_date_missing",
                          "current_reference"
                        ]
                      },
                      "transaction_category": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "unspecified",
                              "initial_acquisition",
                              "business_expansion",
                              "owner_buyout",
                              "esop_or_cooperative"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "transaction_category_source": {
                        "type": "string",
                        "enum": [
                          "supplied",
                          "sop81_initial_acquisition_default",
                          "not_applicable"
                        ]
                      },
                      "business_purchase_price": {
                        "oneOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "flags": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "code": {
                              "type": "string",
                              "pattern": "^[\\s\\S]{1,120}:[a-z][a-z0-9_]{0,99}$",
                              "maxLength": 221
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "present",
                                "missing",
                                "review"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "code",
                            "status",
                            "message"
                          ]
                        }
                      }
                    },
                    "required": [
                      "status",
                      "sba_program",
                      "policy_reference",
                      "policy_status",
                      "transaction_category",
                      "transaction_category_source",
                      "business_purchase_price",
                      "flags"
                    ]
                  },
                  "scope": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "included_items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "embedded_items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "excluded_items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "partial_ownership_items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "included_items",
                      "embedded_items",
                      "excluded_items",
                      "partial_ownership_items"
                    ]
                  }
                },
                "required": [
                  "status",
                  "scope",
                  "conclusion",
                  "evidence_strength",
                  "permitted_use",
                  "analysis_maturity",
                  "reconciliation_status",
                  "material_gaps",
                  "next_questions",
                  "lending_readiness"
                ]
              },
              "results": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "item_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "business",
                        "commercial_real_estate",
                        "brand",
                        "customer_relationships",
                        "intangible",
                        "equipment",
                        "inventory",
                        "other"
                      ]
                    },
                    "name": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "valued",
                        "abstained"
                      ]
                    },
                    "conclusion": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "amount": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            },
                            "range": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "low": {
                                      "type": "number"
                                    },
                                    "high": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "low",
                                    "high"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "value_basis": {
                              "type": "string",
                              "enum": [
                                "asset_value",
                                "enterprise_value",
                                "equity_value",
                                "mixed_transaction_value",
                                "unspecified"
                              ]
                            }
                          },
                          "required": [
                            "amount",
                            "currency",
                            "range",
                            "value_basis"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primary_methodology": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "family": {
                              "type": "string",
                              "enum": [
                                "income",
                                "market",
                                "asset",
                                "intangible_asset"
                              ]
                            },
                            "rationale_codes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "caller_selected_method",
                                  "best_supported_method",
                                  "cash_flow_supported",
                                  "asset_evidence_supported",
                                  "market_evidence_supported",
                                  "revenue_screening_only",
                                  "asset_specific_method"
                                ]
                              }
                            },
                            "rationale": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "name",
                            "family",
                            "rationale_codes",
                            "rationale"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "alternatives": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "methodology": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "indicated_value": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "oneOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value_basis": {
                            "type": "string",
                            "enum": [
                              "asset_value",
                              "enterprise_value",
                              "equity_value",
                              "mixed_transaction_value",
                              "unspecified"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "calculated",
                              "abstained"
                            ]
                          },
                          "warning_codes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "insufficient_inputs",
                                "input_reconciliation_required",
                                "future_dated_evidence_excluded",
                                "stale_evidence",
                                "provisional_assumption",
                                "comparable_evidence_review",
                                "nonpositive_economics",
                                "method_review_required"
                              ]
                            }
                          }
                        },
                        "required": [
                          "methodology",
                          "indicated_value",
                          "currency",
                          "value_basis",
                          "status",
                          "warning_codes"
                        ]
                      }
                    },
                    "method_comparison": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "methods_considered": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "reconciliation_status": {
                          "type": "string",
                          "enum": [
                            "not_available",
                            "consistent",
                            "divergent"
                          ]
                        }
                      },
                      "required": [
                        "methods_considered",
                        "reconciliation_status"
                      ]
                    },
                    "evidence_summary": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "evidence_strength": {
                          "type": "string",
                          "enum": [
                            "insufficient",
                            "limited",
                            "supported",
                            "strong"
                          ]
                        },
                        "permitted_use": {
                          "type": "string",
                          "enum": [
                            "withheld",
                            "screening_only",
                            "decision_support_with_review",
                            "expert_review_candidate"
                          ]
                        },
                        "analysis_maturity": {
                          "type": "string",
                          "enum": [
                            "synthetic_screening",
                            "screening"
                          ]
                        },
                        "financials_status": {
                          "type": "string",
                          "enum": [
                            "not_provided",
                            "normalized",
                            "no_eligible_period"
                          ]
                        },
                        "selected_period": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periods_supplied": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "earnings_trend": {
                          "type": "string",
                          "enum": [
                            "insufficient_history",
                            "improving",
                            "declining",
                            "mixed",
                            "flat"
                          ]
                        },
                        "benchmark_support": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "resolution": {
                              "type": "string",
                              "enum": [
                                "not_applicable",
                                "exact",
                                "inferred",
                                "withheld"
                              ]
                            },
                            "evidence_class": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "observed",
                                    "derived",
                                    "modeled"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "as_of": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "geography": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "maxLength": 200
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_families": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "U.S. Census Bureau"
                                ]
                              }
                            },
                            "naics": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "requested_code": {
                                      "type": "string",
                                      "pattern": "^[0-9]{6}$"
                                    },
                                    "selected_code": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "pattern": "^[0-9]{6}$"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "match": {
                                      "type": "string",
                                      "enum": [
                                        "not_found",
                                        "exact_six_digit",
                                        "exact_six_digit_context_only"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "requested_code",
                                    "selected_code",
                                    "match"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "fallback_lineage": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "outcome": {
                                      "type": "string",
                                      "enum": [
                                        "not_needed",
                                        "inferred",
                                        "no_safe_fallback",
                                        "not_applicable"
                                      ]
                                    },
                                    "donor_naics_codes": {
                                      "type": "array",
                                      "uniqueItems": true,
                                      "items": {
                                        "type": "string",
                                        "pattern": "^[0-9]{6}$"
                                      }
                                    },
                                    "confidence": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "high",
                                            "moderate",
                                            "limited"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "permitted_use": {
                                      "type": "string",
                                      "enum": [
                                        "missing_input_screening",
                                        "context_only",
                                        "withheld",
                                        "not_applicable"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "outcome",
                                    "donor_naics_codes",
                                    "confidence",
                                    "permitted_use"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "resolution",
                            "evidence_class",
                            "as_of",
                            "geography",
                            "source_families",
                            "naics",
                            "fallback_lineage"
                          ]
                        },
                        "input_support": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "required": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "evidenced": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "verified": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "unverified_or_modeled": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "undated": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stale": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "required",
                            "evidenced",
                            "verified",
                            "unverified_or_modeled",
                            "undated",
                            "stale"
                          ]
                        },
                        "assumption_support": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "required": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "market_supported": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "caller_supplied": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "policy_default": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "required",
                            "market_supported",
                            "caller_supplied",
                            "policy_default"
                          ]
                        },
                        "input_provenance": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "field": {
                                "type": "string",
                                "enum": [
                                  "adjusted_assets",
                                  "annual_revenue",
                                  "capital_structure",
                                  "cash_flows",
                                  "completion_costs",
                                  "current_market_value",
                                  "disposal_costs",
                                  "ebitda",
                                  "employee_count",
                                  "financial_history",
                                  "inventory_gross_value",
                                  "liabilities",
                                  "net_operating_income",
                                  "owner_labor",
                                  "projected_revenue",
                                  "replacement_cost",
                                  "sde",
                                  "selling_costs"
                                ]
                              },
                              "evidence_status": {
                                "type": "string",
                                "enum": [
                                  "missing",
                                  "current_verified_attestation",
                                  "undated_verified_attestation",
                                  "stale_verified_attestation",
                                  "future_dated",
                                  "unverified_or_modeled"
                                ]
                              },
                              "source_types": {
                                "type": "array",
                                "uniqueItems": true,
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "owner_input",
                                    "advisor_input",
                                    "lender_input",
                                    "user_scenario",
                                    "market_comparable",
                                    "appraisal",
                                    "public_dataset",
                                    "internal_benchmark",
                                    "model_policy",
                                    "financial_statement",
                                    "tax_return",
                                    "other"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "field",
                              "evidence_status",
                              "source_types"
                            ]
                          }
                        },
                        "assumption_provenance": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "category": {
                                "type": "string",
                                "enum": [
                                  "asset_obsolescence",
                                  "asset_recovery",
                                  "capitalization_and_discounting",
                                  "growth",
                                  "intangible_economics",
                                  "market_comparables",
                                  "market_pricing",
                                  "tax"
                                ]
                              },
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "request_attested_verified",
                                  "request_attested_unverified",
                                  "modeled"
                                ]
                              },
                              "timing": {
                                "type": "string",
                                "enum": [
                                  "current",
                                  "undated",
                                  "stale",
                                  "future_dated"
                                ]
                              }
                            },
                            "required": [
                              "category",
                              "source_type",
                              "verification",
                              "timing"
                            ]
                          }
                        },
                        "data_used": {
                          "type": "array",
                          "uniqueItems": true,
                          "maxItems": 2048,
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                            "maxLength": 500
                          }
                        },
                        "data_not_used": {
                          "type": "array",
                          "uniqueItems": true,
                          "maxItems": 2048,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "field": {
                                "type": "string",
                                "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:(?:\\.[A-Za-z][A-Za-z0-9_-]*)|(?:\\[[0-9]+\\]))*$",
                                "maxLength": 500
                              },
                              "why": {
                                "type": "string",
                                "enum": [
                                  "This information did not affect this valuation.",
                                  "Value does not currently use this information."
                                ]
                              }
                            },
                            "required": [
                              "field",
                              "why"
                            ]
                          }
                        }
                      },
                      "required": [
                        "evidence_strength",
                        "permitted_use",
                        "analysis_maturity",
                        "financials_status",
                        "selected_period",
                        "periods_supplied",
                        "earnings_trend",
                        "data_used",
                        "data_not_used",
                        "input_support",
                        "assumption_support",
                        "input_provenance",
                        "assumption_provenance",
                        "benchmark_support"
                      ]
                    },
                    "uncertainty": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "range": {
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "low": {
                                  "type": "number"
                                },
                                "high": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "low",
                                "high"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "const": "modeled_sensitivity_range"
                        },
                        "driver_categories": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "operating_performance",
                              "market_assumptions",
                              "asset_economics",
                              "valuation_assumptions"
                            ]
                          }
                        }
                      },
                      "required": [
                        "range",
                        "label",
                        "driver_categories"
                      ]
                    },
                    "material_gaps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,99}$"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ]
                      }
                    },
                    "next_questions": {
                      "type": "array",
                      "description": "Questions scoped to this item. Collect these together with portfolio.next_questions and the other item lists before making one explicit revised run.",
                      "maxItems": 32,
                      "items": {
                        "type": "object",
                        "description": "One actionable follow-up question. question_id is stable within the immutable valuation result and answer_paths identify the public input fields an answer can improve. Persisted Workspace valuations can submit the question ID and a value through the refinement endpoint; the server applies the first stored path to create a linked successor, and never mutates the source valuation.",
                        "additionalProperties": false,
                        "properties": {
                          "question_id": {
                            "type": "string",
                            "pattern": "^vquestion_[0-9a-f]{32}_(p|i[1-9][0-9]*)_[1-9][0-9]*$",
                            "description": "Stable identifier for submitting an answer against this exact persisted valuation question."
                          },
                          "rank": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 32
                          },
                          "question": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "improves": {
                            "type": "string",
                            "enum": [
                              "subject_scope",
                              "financial_normalization",
                              "valuation_basis",
                              "method_fit",
                              "assumption_support",
                              "risk"
                            ]
                          },
                          "why": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "answer_paths": {
                            "type": "array",
                            "minItems": 1,
                            "uniqueItems": true,
                            "items": {
                              "type": "string",
                              "enum": [
                                "valuation_context.lending_context.sba_loan_number_date",
                                "valuation_context.lending_context.qualified_source_engaged",
                                "valuation_context.lending_context.qualified_source_credential",
                                "valuation_context.lending_context.qualified_source_independent",
                                "valuation_context.lending_context.seller_financials_verified_against_irs_transcripts",
                                "valuation_context.lending_context.lender_requested_valuation",
                                "valuation_context.lending_context.valuation_prepared_for_lender",
                                "valuation_context.transaction_type",
                                "valuation_context.ownership_basis",
                                "items[].type",
                                "items[].description",
                                "items[].portfolio_treatment",
                                "items[].details.projection_period_unit",
                                "items[].details.cash_flow_basis",
                                "items[].details.owner_labor",
                                "items[].details.sde",
                                "items[].details.ebitda",
                                "items[].details.financial_history",
                                "items[].details.financial_history[].normalization_adjustments[].provenance",
                                "items[].details.capital_structure",
                                "items[].details.business_real_estate_earnings_basis",
                                "items[].market_comparables",
                                "portfolio_adjustments[].provenance",
                                "valuation_context.lending_context.sba_program",
                                "valuation_context.lending_context.transaction_category",
                                "valuation_context.lending_context.esop_transaction",
                                "valuation_context.lending_context.erisa_valuation_obtained",
                                "valuation_context.lending_context.erisa_valuation_independent",
                                "valuation_context.lending_context.erisa_valuation_evidence_present",
                                "valuation_context.lending_context.seller_financials_irs_reconciliation_status",
                                "valuation_context.lending_context.quality_of_earnings_financial_reconciliation_complete",
                                "valuation_context.lending_context.purchase_agreement_price",
                                "valuation_context.lending_context.owner_occupied_commercial_real_estate_appraised_value",
                                "valuation_context.lending_context.business_purchase_price",
                                "valuation_context.lending_context.business_acquisition_debt_amount",
                                "valuation_context.lending_context.debt_service_coverage_ratio",
                                "valuation_context.lending_context.global_debt_service_coverage_ratio",
                                "valuation_context.lending_context.land_equity_contributed",
                                "valuation_context.lending_context.third_party_lender_owned_real_estate",
                                "valuation_context.lending_context.seller_carryback_counts_as_borrower_contribution",
                                "valuation_context.lending_context.lender_requires_real_estate_appraisal",
                                "valuation_context.lending_context.fixed_asset_value",
                                "valuation_context.lending_context.fixed_asset_net_book_value",
                                "items[].details.project_property_estimated_value",
                                "items[].details.appraised_value",
                                "items[].assumptions.capitalization_rate"
                              ]
                            }
                          }
                        },
                        "required": [
                          "question_id",
                          "rank",
                          "question",
                          "improves",
                          "why",
                          "answer_paths"
                        ]
                      }
                    },
                    "lending_readiness": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_requested",
                            "screening_ready",
                            "needs_information"
                          ]
                        },
                        "sba_program": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "7a",
                                "504",
                                "other_sba",
                                "not_sba"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "policy_reference": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "policy_status": {
                          "type": "string",
                          "enum": [
                            "not_requested",
                            "program_missing",
                            "program_not_applicable",
                            "program_unsupported",
                            "policy_date_missing",
                            "current_reference"
                          ]
                        },
                        "transaction_category": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "unspecified",
                                "initial_acquisition",
                                "business_expansion",
                                "owner_buyout",
                                "esop_or_cooperative"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "transaction_category_source": {
                          "type": "string",
                          "enum": [
                            "supplied",
                            "sop81_initial_acquisition_default",
                            "not_applicable"
                          ]
                        },
                        "business_purchase_price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "flags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "code": {
                                "type": "string",
                                "pattern": "^[a-z][a-z0-9_]{0,99}$",
                                "maxLength": 100
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "present",
                                  "missing",
                                  "review"
                                ]
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "code",
                              "status",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "status",
                        "sba_program",
                        "policy_reference",
                        "policy_status",
                        "transaction_category",
                        "transaction_category_source",
                        "business_purchase_price",
                        "flags"
                      ]
                    },
                    "financial_reconciliation": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_provided",
                            "normalized",
                            "no_eligible_period"
                          ]
                        },
                        "selected_period_end": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selected_period_type": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "annual",
                                "ltm",
                                "interim"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "annual_revenue": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sde": {
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "reported": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "accepted_adjustments": {
                                  "type": "number"
                                },
                                "proposed_adjustments": {
                                  "type": "number"
                                },
                                "excluded_adjustments": {
                                  "type": "number"
                                },
                                "normalized": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "reported",
                                "accepted_adjustments",
                                "proposed_adjustments",
                                "excluded_adjustments",
                                "normalized"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "ebitda": {
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "reported": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "accepted_adjustments": {
                                  "type": "number"
                                },
                                "proposed_adjustments": {
                                  "type": "number"
                                },
                                "excluded_adjustments": {
                                  "type": "number"
                                },
                                "normalized": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "reported",
                                "accepted_adjustments",
                                "proposed_adjustments",
                                "excluded_adjustments",
                                "normalized"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "top_level_reconciliation": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "sde": {
                              "type": "string",
                              "enum": [
                                "not_comparable",
                                "reconciled",
                                "conflict"
                              ]
                            },
                            "ebitda": {
                              "type": "string",
                              "enum": [
                                "not_comparable",
                                "reconciled",
                                "conflict"
                              ]
                            }
                          },
                          "required": [
                            "sde",
                            "ebitda"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "selected_period_end",
                        "selected_period_type",
                        "annual_revenue",
                        "sde",
                        "ebitda",
                        "top_level_reconciliation"
                      ]
                    },
                    "scope": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "portfolio_treatment": {
                              "const": "included"
                            },
                            "ownership_fraction": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "maximum": 1
                            },
                            "parent_item_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "portfolio_treatment",
                            "ownership_fraction",
                            "parent_item_id"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "portfolio_treatment": {
                              "const": "embedded"
                            },
                            "ownership_fraction": {
                              "type": "null"
                            },
                            "parent_item_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            }
                          },
                          "required": [
                            "portfolio_treatment",
                            "ownership_fraction",
                            "parent_item_id"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "portfolio_treatment": {
                              "const": "excluded"
                            },
                            "ownership_fraction": {
                              "type": "null"
                            },
                            "parent_item_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "portfolio_treatment",
                            "ownership_fraction",
                            "parent_item_id"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "item_id",
                    "type",
                    "name",
                    "status",
                    "scope",
                    "conclusion",
                    "primary_methodology",
                    "alternatives",
                    "method_comparison",
                    "evidence_summary",
                    "financial_reconciliation",
                    "uncertainty",
                    "material_gaps",
                    "next_questions",
                    "lending_readiness"
                  ]
                }
              },
              "item_count": {
                "type": "integer",
                "minimum": 1
              },
              "limitations": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "result_hash": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$",
                "description": "SHA-256 of the UTF-8 deterministic canonical JSON public result after API-owned question IDs are projected, with result_hash itself omitted. Object keys are sorted recursively and array order is preserved."
              },
              "benchmark_release": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "family": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "snapshot_id": {
                    "type": "string",
                    "pattern": "^bm_[0-9a-f]{16}$"
                  }
                },
                "required": [
                  "family",
                  "version",
                  "snapshot_id"
                ]
              },
              "persistence": {
                "type": "object",
                "additionalProperties": false,
                "description": "Best-effort guest persistence. A completed valuation can be claimed after authentication; an unavailable status does not invalidate the computed valuation result.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "unavailable"
                    ],
                    "description": "Whether SMB saved this public valuation for a later claim."
                  },
                  "intake_id": {
                    "type": "string",
                    "pattern": "^vin_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "description": "Saved guest intake. Present whenever status is completed."
                  },
                  "claim_token": {
                    "type": "string",
                    "pattern": "^vclaim_[0-9a-f]{64}$",
                    "readOnly": true,
                    "description": "One-time secret returned only by the first successful execution. Save it securely; an idempotent replay deliberately omits it.",
                    "x-smb-secret-once": true
                  }
                },
                "required": [
                  "status"
                ],
                "oneOf": [
                  {
                    "properties": {
                      "status": {
                        "const": "completed"
                      }
                    },
                    "required": [
                      "status",
                      "intake_id"
                    ]
                  },
                  {
                    "properties": {
                      "status": {
                        "const": "unavailable"
                      }
                    },
                    "required": [
                      "status"
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "intake_id"
                          ]
                        },
                        {
                          "required": [
                            "claim_token"
                          ]
                        }
                      ]
                    }
                  }
                ]
              }
            },
            "required": [
              "benchmark_release",
              "benchmark_snapshot_id",
              "currency",
              "item_count",
              "limitations",
              "model_release",
              "persistence",
              "portfolio",
              "reference",
              "result_hash",
              "results",
              "schema_version",
              "scope",
              "valuation_date",
              "valuation_id"
            ]
          }
        ],
        "x-smb-persistence": {
          "mode": "best_effort",
          "claim_token_delivery": "first_success_only",
          "replay_behavior": "claim_token_omitted"
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/run_valuation/http-response",
        "title": "Run a valuation HTTP response"
      },
      "smb.v0.operations.run_valuation.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
                "description": "Optional caller-generated retry key. Reusing the same key returns the saved valuation but never reveals its one-time claim token again.",
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": []
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "valuation_date": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "currency": {
                "default": "USD",
                "type": "string",
                "enum": [
                  "USD"
                ],
                "description": "Value v1.16 currently accepts USD only. Other currencies must be converted before valuation."
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "description": "Optional caller-defined label returned as reference so the result can be matched to the caller's workflow."
              },
              "valuation_context": {
                "default": {
                  "purpose": "screening",
                  "standard": "unspecified",
                  "premise": "going_concern",
                  "transaction_type": "unspecified",
                  "ownership_basis": "unspecified"
                },
                "type": "object",
                "properties": {
                  "purpose": {
                    "default": "screening",
                    "type": "string",
                    "enum": [
                      "screening",
                      "sale_or_purchase",
                      "lending",
                      "financial_reporting",
                      "tax",
                      "litigation",
                      "internal_planning",
                      "other"
                    ]
                  },
                  "standard": {
                    "default": "unspecified",
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "fair_market_value",
                      "investment_value",
                      "fair_value",
                      "liquidation_value",
                      "other"
                    ]
                  },
                  "premise": {
                    "default": "going_concern",
                    "type": "string",
                    "enum": [
                      "going_concern",
                      "orderly_liquidation",
                      "forced_liquidation"
                    ]
                  },
                  "transaction_type": {
                    "default": "unspecified",
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "asset_sale",
                      "equity_sale"
                    ]
                  },
                  "ownership_basis": {
                    "default": "unspecified",
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "controlling",
                      "minority"
                    ]
                  },
                  "lending_context": {
                    "type": "object",
                    "properties": {
                      "sba_loan_number_date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      "transaction_category": {
                        "default": "unspecified",
                        "type": "string",
                        "enum": [
                          "unspecified",
                          "initial_acquisition",
                          "business_expansion",
                          "owner_buyout",
                          "esop_or_cooperative"
                        ]
                      },
                      "business_purchase_price": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "additional_equity_above_valuation": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "debt_service_coverage_ratio": {
                        "type": "number",
                        "minimum": 0
                      },
                      "amount_financed_excluding_appraised_real_estate_and_equipment": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "related_party_transaction": {
                        "type": "boolean"
                      },
                      "special_purpose_property": {
                        "type": "boolean"
                      },
                      "lender_requested_valuation": {
                        "type": "boolean"
                      },
                      "valuation_prepared_for_lender": {
                        "type": "boolean"
                      },
                      "valuation_scope_identifies_included_assets_and_assumed_debt": {
                        "type": "boolean"
                      },
                      "valuation_conclusion_signed": {
                        "type": "boolean"
                      },
                      "qualified_source_engaged": {
                        "type": "boolean"
                      },
                      "qualified_source_credential": {
                        "default": "unspecified",
                        "type": "string",
                        "enum": [
                          "unspecified",
                          "asa",
                          "cba",
                          "abv",
                          "cva",
                          "bca",
                          "certified_general_real_property_appraiser",
                          "other"
                        ]
                      },
                      "qualified_source_independent": {
                        "type": "boolean"
                      },
                      "seller_financials_verified_against_irs_transcripts": {
                        "type": "boolean"
                      },
                      "quality_of_earnings_obtained": {
                        "type": "boolean"
                      },
                      "quality_of_earnings_cash_proof_complete": {
                        "type": "boolean"
                      },
                      "quality_of_earnings_used_for_debt_service_coverage": {
                        "type": "boolean"
                      },
                      "sba_program": {
                        "type": "string",
                        "enum": [
                          "7a",
                          "504",
                          "other_sba",
                          "not_sba"
                        ]
                      },
                      "esop_transaction": {
                        "type": "boolean"
                      },
                      "erisa_valuation_obtained": {
                        "type": "boolean"
                      },
                      "erisa_valuation_independent": {
                        "type": "boolean"
                      },
                      "erisa_valuation_evidence_present": {
                        "type": "boolean"
                      },
                      "seller_financials_irs_reconciliation_status": {
                        "type": "string",
                        "enum": [
                          "matched",
                          "conflict",
                          "not_available"
                        ]
                      },
                      "quality_of_earnings_financial_reconciliation_complete": {
                        "type": "boolean"
                      },
                      "purchase_agreement_price": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "owner_occupied_commercial_real_estate_appraised_value": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "business_acquisition_debt_amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "global_debt_service_coverage_ratio": {
                        "type": "number",
                        "minimum": 0
                      },
                      "land_equity_contributed": {
                        "type": "boolean"
                      },
                      "third_party_lender_owned_real_estate": {
                        "type": "boolean"
                      },
                      "seller_carryback_counts_as_borrower_contribution": {
                        "type": "boolean"
                      },
                      "lender_requires_real_estate_appraisal": {
                        "type": "boolean"
                      },
                      "fixed_asset_value": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      },
                      "fixed_asset_net_book_value": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "description": "Optional purpose, standard, premise, transaction, ownership, and SBA lending context. Screening defaults apply when omitted."
              },
              "portfolio_adjustments": {
                "default": [],
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "adjustment_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "operation": {
                      "type": "string",
                      "enum": [
                        "add",
                        "subtract"
                      ]
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "provenance": {
                      "type": "object",
                      "properties": {
                        "source_type": {
                          "type": "string",
                          "enum": [
                            "owner_input",
                            "advisor_input",
                            "lender_input",
                            "user_scenario",
                            "market_comparable",
                            "appraisal",
                            "public_dataset",
                            "internal_benchmark",
                            "model_policy",
                            "financial_statement",
                            "tax_return",
                            "other"
                          ]
                        },
                        "source_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "verification": {
                          "type": "string",
                          "enum": [
                            "verified",
                            "unverified",
                            "modeled"
                          ]
                        },
                        "observed_at": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        "reference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "note": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "source_type",
                        "source_name",
                        "verification"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "adjustment_id",
                    "label",
                    "operation",
                    "amount",
                    "provenance"
                  ],
                  "additionalProperties": false
                },
                "description": "Optional portfolio-level additions or deductions with provenance."
              },
              "items": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/smb_v0_operations_run_valuation_request.__local.properties.body.BusinessReference"
                    },
                    {
                      "$ref": "#/components/schemas/smb_v0_operations_run_valuation_request.__local.properties.body.AssetInput"
                    }
                  ]
                },
                "description": "One or more businesses or assets to value. There is no fixed item-count limit. The encoded request must be no larger than 8 MiB and Value rejects normalized workloads above 15,000 structural work units. Use business_id for a Business SMB already knows; otherwise send type and whatever details are available."
              },
              "combine_as_portfolio": {
                "type": "boolean",
                "default": false,
                "description": "Required as true when items contains more than one entry, confirming that the entries should be valued together as one portfolio."
              }
            },
            "required": [
              "items"
            ],
            "additionalProperties": false,
            "title": "Run a valuation input",
            "description": "Identify an existing SMB Business or describe any business, real estate, equipment, brand, customer book, or mixed portfolio using only the facts available. SMB Value selects applicable methods and returns a compact result for every item plus a portfolio Bestimate, range, evidence support, missing information, and review flags.",
            "examples": [
              {
                "reference": "owner-operated-hvac-business",
                "valuation_context": {
                  "purpose": "sale_or_purchase",
                  "standard": "fair_market_value",
                  "premise": "going_concern",
                  "transaction_type": "asset_sale",
                  "ownership_basis": "controlling"
                },
                "items": [
                  {
                    "asset_id": "hvac-business",
                    "type": "business",
                    "name": "Sample HVAC Services",
                    "details": {
                      "naics_code": "238220",
                      "employee_count": 18,
                      "owner_operated": true,
                      "annual_revenue": 2800000,
                      "sde": 520000,
                      "ebitda": 410000,
                      "adjusted_assets": 310000,
                      "liabilities": 85000,
                      "stable_earnings": true,
                      "business_real_estate_earnings_basis": "not_applicable"
                    }
                  }
                ]
              },
              {
                "reference": "two-location-coffee-franchise",
                "combine_as_portfolio": true,
                "items": [
                  {
                    "asset_id": "coffee-unit-columbus",
                    "type": "business",
                    "name": "Sample Coffee - Columbus",
                    "details": {
                      "naics_code": "722515",
                      "employee_count": 12,
                      "annual_revenue": 1450000,
                      "sde": 255000,
                      "ebitda": 205000,
                      "business_real_estate_earnings_basis": "market_rent_reflected"
                    },
                    "portfolio_treatment": {
                      "mode": "include",
                      "ownership_fraction": 1
                    }
                  },
                  {
                    "asset_id": "coffee-cre-columbus",
                    "type": "commercial_real_estate",
                    "name": "Sample Coffee Property - Columbus",
                    "details": {
                      "net_operating_income": 112000
                    },
                    "portfolio_treatment": {
                      "mode": "include",
                      "ownership_fraction": 1
                    }
                  },
                  {
                    "asset_id": "coffee-unit-dayton",
                    "type": "business",
                    "name": "Sample Coffee - Dayton",
                    "details": {
                      "naics_code": "722515",
                      "employee_count": 10,
                      "annual_revenue": 1180000,
                      "sde": 202000,
                      "ebitda": 158000,
                      "business_real_estate_earnings_basis": "market_rent_reflected"
                    },
                    "portfolio_treatment": {
                      "mode": "include",
                      "ownership_fraction": 1
                    }
                  },
                  {
                    "asset_id": "coffee-cre-dayton",
                    "type": "commercial_real_estate",
                    "name": "Sample Coffee Property - Dayton",
                    "details": {
                      "net_operating_income": 94000
                    },
                    "portfolio_treatment": {
                      "mode": "include",
                      "ownership_fraction": 1
                    }
                  }
                ]
              }
            ]
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/run_valuation/request",
        "title": "Run a valuation request"
      },
      "smb.v0.operations.run_valuation.request/properties/body": {
        "type": "object",
        "properties": {
          "valuation_date": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "enum": [
              "USD"
            ],
            "description": "Value v1.16 currently accepts USD only. Other currencies must be converted before valuation."
          },
          "reference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Optional caller-defined label returned as reference so the result can be matched to the caller's workflow."
          },
          "valuation_context": {
            "default": {
              "purpose": "screening",
              "standard": "unspecified",
              "premise": "going_concern",
              "transaction_type": "unspecified",
              "ownership_basis": "unspecified"
            },
            "type": "object",
            "properties": {
              "purpose": {
                "default": "screening",
                "type": "string",
                "enum": [
                  "screening",
                  "sale_or_purchase",
                  "lending",
                  "financial_reporting",
                  "tax",
                  "litigation",
                  "internal_planning",
                  "other"
                ]
              },
              "standard": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fair_market_value",
                  "investment_value",
                  "fair_value",
                  "liquidation_value",
                  "other"
                ]
              },
              "premise": {
                "default": "going_concern",
                "type": "string",
                "enum": [
                  "going_concern",
                  "orderly_liquidation",
                  "forced_liquidation"
                ]
              },
              "transaction_type": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "asset_sale",
                  "equity_sale"
                ]
              },
              "ownership_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "controlling",
                  "minority"
                ]
              },
              "lending_context": {
                "type": "object",
                "properties": {
                  "sba_loan_number_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "transaction_category": {
                    "default": "unspecified",
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "initial_acquisition",
                      "business_expansion",
                      "owner_buyout",
                      "esop_or_cooperative"
                    ]
                  },
                  "business_purchase_price": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "additional_equity_above_valuation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_service_coverage_ratio": {
                    "type": "number",
                    "minimum": 0
                  },
                  "amount_financed_excluding_appraised_real_estate_and_equipment": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "related_party_transaction": {
                    "type": "boolean"
                  },
                  "special_purpose_property": {
                    "type": "boolean"
                  },
                  "lender_requested_valuation": {
                    "type": "boolean"
                  },
                  "valuation_prepared_for_lender": {
                    "type": "boolean"
                  },
                  "valuation_scope_identifies_included_assets_and_assumed_debt": {
                    "type": "boolean"
                  },
                  "valuation_conclusion_signed": {
                    "type": "boolean"
                  },
                  "qualified_source_engaged": {
                    "type": "boolean"
                  },
                  "qualified_source_credential": {
                    "default": "unspecified",
                    "type": "string",
                    "enum": [
                      "unspecified",
                      "asa",
                      "cba",
                      "abv",
                      "cva",
                      "bca",
                      "certified_general_real_property_appraiser",
                      "other"
                    ]
                  },
                  "qualified_source_independent": {
                    "type": "boolean"
                  },
                  "seller_financials_verified_against_irs_transcripts": {
                    "type": "boolean"
                  },
                  "quality_of_earnings_obtained": {
                    "type": "boolean"
                  },
                  "quality_of_earnings_cash_proof_complete": {
                    "type": "boolean"
                  },
                  "quality_of_earnings_used_for_debt_service_coverage": {
                    "type": "boolean"
                  },
                  "sba_program": {
                    "type": "string",
                    "enum": [
                      "7a",
                      "504",
                      "other_sba",
                      "not_sba"
                    ]
                  },
                  "esop_transaction": {
                    "type": "boolean"
                  },
                  "erisa_valuation_obtained": {
                    "type": "boolean"
                  },
                  "erisa_valuation_independent": {
                    "type": "boolean"
                  },
                  "erisa_valuation_evidence_present": {
                    "type": "boolean"
                  },
                  "seller_financials_irs_reconciliation_status": {
                    "type": "string",
                    "enum": [
                      "matched",
                      "conflict",
                      "not_available"
                    ]
                  },
                  "quality_of_earnings_financial_reconciliation_complete": {
                    "type": "boolean"
                  },
                  "purchase_agreement_price": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "owner_occupied_commercial_real_estate_appraised_value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "business_acquisition_debt_amount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "global_debt_service_coverage_ratio": {
                    "type": "number",
                    "minimum": 0
                  },
                  "land_equity_contributed": {
                    "type": "boolean"
                  },
                  "third_party_lender_owned_real_estate": {
                    "type": "boolean"
                  },
                  "seller_carryback_counts_as_borrower_contribution": {
                    "type": "boolean"
                  },
                  "lender_requires_real_estate_appraisal": {
                    "type": "boolean"
                  },
                  "fixed_asset_value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "fixed_asset_net_book_value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false,
            "description": "Optional purpose, standard, premise, transaction, ownership, and SBA lending context. Screening defaults apply when omitted."
          },
          "portfolio_adjustments": {
            "default": [],
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "adjustment_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "add",
                    "subtract"
                  ]
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 90071992547409.9
                },
                "provenance": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjustment_id",
                "label",
                "operation",
                "amount",
                "provenance"
              ],
              "additionalProperties": false
            },
            "description": "Optional portfolio-level additions or deductions with provenance."
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/smb_v0_operations_run_valuation_request~1properties~1body.__local.BusinessReference"
                },
                {
                  "$ref": "#/components/schemas/smb_v0_operations_run_valuation_request~1properties~1body.__local.AssetInput"
                }
              ]
            },
            "description": "One or more businesses or assets to value. There is no fixed item-count limit. The encoded request must be no larger than 8 MiB and Value rejects normalized workloads above 15,000 structural work units. Use business_id for a Business SMB already knows; otherwise send type and whatever details are available."
          },
          "combine_as_portfolio": {
            "type": "boolean",
            "default": false,
            "description": "Required as true when items contains more than one entry, confirming that the entries should be valued together as one portfolio."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "title": "Run a valuation input",
        "description": "Identify an existing SMB Business or describe any business, real estate, equipment, brand, customer book, or mixed portfolio using only the facts available. SMB Value selects applicable methods and returns a compact result for every item plus a portfolio Bestimate, range, evidence support, missing information, and review flags.",
        "examples": [
          {
            "reference": "owner-operated-hvac-business",
            "valuation_context": {
              "purpose": "sale_or_purchase",
              "standard": "fair_market_value",
              "premise": "going_concern",
              "transaction_type": "asset_sale",
              "ownership_basis": "controlling"
            },
            "items": [
              {
                "asset_id": "hvac-business",
                "type": "business",
                "name": "Sample HVAC Services",
                "details": {
                  "naics_code": "238220",
                  "employee_count": 18,
                  "owner_operated": true,
                  "annual_revenue": 2800000,
                  "sde": 520000,
                  "ebitda": 410000,
                  "adjusted_assets": 310000,
                  "liabilities": 85000,
                  "stable_earnings": true,
                  "business_real_estate_earnings_basis": "not_applicable"
                }
              }
            ]
          },
          {
            "reference": "two-location-coffee-franchise",
            "combine_as_portfolio": true,
            "items": [
              {
                "asset_id": "coffee-unit-columbus",
                "type": "business",
                "name": "Sample Coffee - Columbus",
                "details": {
                  "naics_code": "722515",
                  "employee_count": 12,
                  "annual_revenue": 1450000,
                  "sde": 255000,
                  "ebitda": 205000,
                  "business_real_estate_earnings_basis": "market_rent_reflected"
                },
                "portfolio_treatment": {
                  "mode": "include",
                  "ownership_fraction": 1
                }
              },
              {
                "asset_id": "coffee-cre-columbus",
                "type": "commercial_real_estate",
                "name": "Sample Coffee Property - Columbus",
                "details": {
                  "net_operating_income": 112000
                },
                "portfolio_treatment": {
                  "mode": "include",
                  "ownership_fraction": 1
                }
              },
              {
                "asset_id": "coffee-unit-dayton",
                "type": "business",
                "name": "Sample Coffee - Dayton",
                "details": {
                  "naics_code": "722515",
                  "employee_count": 10,
                  "annual_revenue": 1180000,
                  "sde": 202000,
                  "ebitda": 158000,
                  "business_real_estate_earnings_basis": "market_rent_reflected"
                },
                "portfolio_treatment": {
                  "mode": "include",
                  "ownership_fraction": 1
                }
              },
              {
                "asset_id": "coffee-cre-dayton",
                "type": "commercial_real_estate",
                "name": "Sample Coffee Property - Dayton",
                "details": {
                  "net_operating_income": 94000
                },
                "portfolio_treatment": {
                  "mode": "include",
                  "ownership_fraction": 1
                }
              }
            ]
          }
        ]
      },
      "smb.v0.operations.run_valuation.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
        "description": "Optional caller-generated retry key. Reusing the same key returns the saved valuation but never reveals its one-time claim token again.",
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.search_businesses.response": {
        "$id": "https://api.smb.co/v1/schemas/operations/search_businesses/response",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "as_of": {
            "$ref": "#/components/schemas/smb_v0_operations_search_businesses_response.__local.Timestamp"
          },
          "data": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "city": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "City of the published primary Business location."
                },
                "closed_on": {
                  "format": "date",
                  "type": "string"
                },
                "country_code": {
                  "type": "string",
                  "const": "US",
                  "description": "Country of the published primary Business location."
                },
                "description": {
                  "type": "string"
                },
                "founded_on": {
                  "format": "date",
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^[0-9]{6}$",
                  "description": "Published primary six-digit NAICS classification."
                },
                "naics_title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500,
                  "description": "Title of the published primary NAICS classification when rights permit."
                },
                "naics_vintage": {
                  "type": "string",
                  "enum": [
                    "1997",
                    "2002",
                    "2007",
                    "2012",
                    "2017",
                    "2022"
                  ],
                  "description": "Edition of the published primary NAICS classification."
                },
                "name": {
                  "type": "string"
                },
                "primary_classification_id": {
                  "$ref": "#/components/schemas/smb_v0_operations_search_businesses_response.__local.OpaqueId"
                },
                "primary_location_id": {
                  "$ref": "#/components/schemas/smb_v0_operations_search_businesses_response.__local.OpaqueId"
                },
                "public_email": {
                  "type": "string"
                },
                "public_phone": {
                  "type": "string"
                },
                "publication_status": {
                  "enum": [
                    "private",
                    "published",
                    "suppressed"
                  ],
                  "type": "string"
                },
                "published_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "record_type": {
                  "const": "business",
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$",
                  "description": "Two-letter state or DC of the published primary Business location."
                },
                "status": {
                  "enum": [
                    "active",
                    "closed",
                    "inactive",
                    "unknown"
                  ],
                  "type": "string"
                },
                "website_url": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "publication_status",
                "record_type",
                "status"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "page": {
            "$ref": "#/components/schemas/smb_v0_operations_search_businesses_response.__local.Page"
          },
          "projection": {
            "const": "public",
            "type": "string"
          },
          "request_id": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "schema_hash": {
            "$ref": "#/components/schemas/smb_v0_operations_search_businesses_response.__local.Digest"
          },
          "schema_version": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "data",
          "page",
          "projection",
          "request_id",
          "schema_hash",
          "schema_version"
        ],
        "title": "Search Businesses Response",
        "type": "object",
        "description": "Anonymous callers receive a preview of up to 20 Businesses without continuation. Signing in through the public MCP OAuth flow also remains preview-only. REST callers with authenticated Workspace authority can request pages of up to 100 Businesses and cursor pagination. Supported Workspace MCP and agent sessions share the same per-principal and per-Workspace discovery allowances; exhausted allowances return 429."
      },
      "smb.v0.operations.search_workspace_businesses.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "workspace_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "cursor": {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "description": "Stable SMB Business ID."
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "default": 20
              },
              "name": {
                "type": "string",
                "minLength": 3,
                "pattern": "^\\s*\\S[\\s\\S]{1,198}\\S\\s*$",
                "description": "Optional Business name filter, 3 to 200 characters after surrounding whitespace is removed. Omit to list all visible Businesses in the Workspace, one page at a time."
              }
            },
            "required": []
          }
        },
        "required": [
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/search_workspace_businesses/request",
        "title": "List Workspace Businesses Request"
      },
      "smb.v0.operations.search_workspace_businesses.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.search_workspace_businesses.request/properties/path/properties/workspace_id": {
        "type": "string",
        "format": "uuid"
      },
      "smb.v0.operations.search_workspace_businesses.request/properties/query/properties/cursor": {
        "type": "string",
        "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
        "description": "Stable SMB Business ID."
      },
      "smb.v0.operations.search_workspace_businesses.request/properties/query/properties/limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "default": 20
      },
      "smb.v0.operations.search_workspace_businesses.request/properties/query/properties/name": {
        "type": "string",
        "minLength": 3,
        "pattern": "^\\s*\\S[\\s\\S]{1,198}\\S\\s*$",
        "description": "Optional Business name filter, 3 to 200 characters after surrounding whitespace is removed. Omit to list all visible Businesses in the Workspace, one page at a time."
      },
      "smb.v0.operations.search_workspace_businesses.response": {
        "$id": "https://api.smb.co/v1/schemas/operations/search_workspace_businesses/response",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "as_of": {
            "$ref": "#/components/schemas/smb_v0_operations_search_workspace_businesses_response.__local.Timestamp"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "access_level": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "view",
                    "edit",
                    "full_access",
                    null
                  ],
                  "description": "The caller's effective access to this Workspace Business. Null means access information is unavailable and must not enable editing.",
                  "readOnly": true
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                  "description": "Stable SMB Business ID."
                },
                "industry_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "latitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": -90,
                  "maximum": 90
                },
                "logo_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 2048,
                  "description": "Saved Workspace business logo URL. HTTP(S) only. Null when none is saved or the saved value is invalid; never inferred from a name or another Workspace."
                },
                "longitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": -180,
                  "maximum": 180
                },
                "naics_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "postal_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "primary_classification_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "primary_location_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "website_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "access_level",
                "address",
                "city",
                "description",
                "id",
                "industry_name",
                "latitude",
                "longitude",
                "naics_code",
                "name",
                "postal_code",
                "primary_classification_id",
                "primary_location_id",
                "state",
                "status",
                "website_url",
                "workspace_id"
              ]
            }
          },
          "page": {
            "$ref": "#/components/schemas/smb_v0_operations_search_workspace_businesses_response.__local.Page"
          },
          "projection": {
            "type": "string",
            "const": "workspace"
          },
          "request_id": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "schema_hash": {
            "$ref": "#/components/schemas/smb_v0_operations_search_workspace_businesses_response.__local.Digest"
          },
          "schema_version": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "data",
          "page",
          "projection",
          "request_id",
          "schema_hash",
          "schema_version"
        ],
        "title": "List Workspace Businesses Response",
        "type": "object"
      },
      "smb.v0.operations.set_list_entry_value.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              "member_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  },
                  {
                    "type": "string",
                    "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  }
                ]
              },
              "column_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)$"
              }
            },
            "required": [
              "list_id",
              "member_id",
              "column_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "value_type": {
                            "type": "string",
                            "const": "text"
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 10000
                          }
                        },
                        "required": [
                          "value_type",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value_type": {
                            "type": "string",
                            "const": "number"
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "value_type",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value_type": {
                            "type": "string",
                            "const": "boolean"
                          },
                          "value": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "value_type",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value_type": {
                            "type": "string",
                            "const": "date"
                          },
                          "value": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          }
                        },
                        "required": [
                          "value_type",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/set_list_entry_value/request",
        "title": "Set a private List value Request"
      },
      "smb.v0.operations.set_list_entry_value.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.set_list_entry_value.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.set_list_entry_value.request/properties/path/properties/column_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)$"
      },
      "smb.v0.operations.set_list_entry_value.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.set_list_entry_value.request/properties/path/properties/member_id": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          },
          {
            "type": "string",
            "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        ]
      },
      "smb.v0.operations.set_list_override.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              "member_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  },
                  {
                    "type": "string",
                    "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
                  }
                ]
              }
            },
            "required": [
              "list_id",
              "member_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "include",
                  "exclude",
                  "remove"
                ]
              },
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "action",
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/set_list_override/request",
        "title": "Include or exclude a List member Request"
      },
      "smb.v0.operations.set_list_override.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.set_list_override.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.set_list_override.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.set_list_override.request/properties/path/properties/member_id": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          },
          {
            "type": "string",
            "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        ]
      },
      "smb.v0.operations.update_list.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            },
            "required": [
              "list_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema0"
              },
              "description": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema1"
              },
              "definition": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema2"
              },
              "expected_version": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema23"
              }
            },
            "required": [
              "expected_version"
            ],
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "name"
                ]
              },
              {
                "required": [
                  "description"
                ]
              },
              {
                "required": [
                  "definition"
                ]
              }
            ]
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/update_list/request",
        "title": "Edit a List Request"
      },
      "smb.v0.operations.update_list.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.update_list.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.update_list.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.operations.update_list_column.request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "x-http-name": "SMB-Workspace-Id"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200,
                "x-http-name": "Idempotency-Key"
              }
            },
            "required": [
              "workspace_id",
              "idempotency_key"
            ]
          },
          "path": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "list_id": {
                "type": "string",
                "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              "column_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)$"
              }
            },
            "required": [
              "list_id",
              "column_id"
            ]
          },
          "query": {
            "type": "object",
            "additionalProperties": false,
            "properties": {},
            "required": []
          },
          "body": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "expected_version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "name",
              "expected_version"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "body",
          "headers",
          "path",
          "query"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/operations/update_list_column/request",
        "title": "Rename a List column Request"
      },
      "smb.v0.operations.update_list_column.request/properties/headers/properties/idempotency_key": {
        "type": "string",
        "minLength": 8,
        "maxLength": 200,
        "x-http-name": "Idempotency-Key"
      },
      "smb.v0.operations.update_list_column.request/properties/headers/properties/workspace_id": {
        "type": "string",
        "format": "uuid",
        "x-http-name": "SMB-Workspace-Id"
      },
      "smb.v0.operations.update_list_column.request/properties/path/properties/column_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)$"
      },
      "smb.v0.operations.update_list_column.request/properties/path/properties/list_id": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "smb.v0.records.business.public": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "https://api.smb.co/v1/schemas/records/businesses/public",
        "title": "Business public projection",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "bestimate_as_of_date": {
            "type": "string",
            "format": "date",
            "readOnly": true
          },
          "bestimate_confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "readOnly": true
          },
          "bestimate_currency": {
            "type": "string",
            "readOnly": true
          },
          "bestimate_high_value": {
            "type": "number",
            "minimum": 0,
            "readOnly": true
          },
          "bestimate_low_value": {
            "type": "number",
            "minimum": 0,
            "readOnly": true
          },
          "bestimate_methodology": {
            "type": "string",
            "readOnly": true
          },
          "bestimate_model_version": {
            "type": "string",
            "readOnly": true
          },
          "bestimate_value": {
            "type": "number",
            "minimum": 0,
            "readOnly": true
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "City of the published primary Business location."
          },
          "closed_on": {
            "type": "string",
            "format": "date"
          },
          "country_code": {
            "type": "string",
            "const": "US",
            "description": "Country of the published primary Business location."
          },
          "description": {
            "type": "string"
          },
          "founded_on": {
            "type": "string",
            "format": "date"
          },
          "id": {
            "type": "string",
            "readOnly": true
          },
          "naics_code": {
            "type": "string",
            "pattern": "^[0-9]{6}$",
            "description": "Published primary six-digit NAICS classification."
          },
          "naics_title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Title of the published primary NAICS classification when rights permit."
          },
          "naics_vintage": {
            "type": "string",
            "enum": [
              "1997",
              "2002",
              "2007",
              "2012",
              "2017",
              "2022"
            ],
            "description": "Edition of the published primary NAICS classification."
          },
          "name": {
            "type": "string"
          },
          "primary_classification_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "primary_location_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "public_email": {
            "type": "string"
          },
          "public_phone": {
            "type": "string"
          },
          "publication_status": {
            "type": "string",
            "const": "published",
            "default": "private"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "Two-letter state or DC of the published primary Business location."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "closed",
              "unknown"
            ]
          },
          "website_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "publication_status",
          "published_at",
          "status"
        ]
      },
      "smb_v0_operations_check_api_health_response.__local.Digest": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema8"
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_create_list_request.__local.properties.body.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_create_list_request.__local.properties.body.__schema15"
          }
        ]
      },
      "smb_v0_operations_create_valuation_intake_request.__local.properties.body.BusinessReference": {
        "type": "object",
        "properties": {
          "business_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The public SMB Business ID to resolve using the caller-authorized Public or Workspace view."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "details": {
            "default": {
              "cash_flow_basis": "unspecified",
              "projection_period_unit": "unspecified",
              "terminal_value_mode": "unspecified"
            },
            "type": "object",
            "properties": {
              "naics_code": {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              "employee_count": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              "owner_operated": {
                "type": "boolean"
              },
              "owner_labor": {
                "type": "object",
                "properties": {
                  "post_transaction_treatment": {
                    "type": "string",
                    "enum": [
                      "buyer_supplied",
                      "hired_replacement",
                      "existing_management",
                      "unspecified"
                    ]
                  },
                  "annual_replacement_compensation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "replacement_compensation_reflected_in_ebitda": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "post_transaction_treatment"
                ],
                "additionalProperties": false
              },
              "asset_intensive": {
                "type": "boolean"
              },
              "stable_earnings": {
                "type": "boolean"
              },
              "business_real_estate_earnings_basis": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "market_rent_reflected",
                  "market_rent_normalized",
                  "unresolved"
                ],
                "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
              },
              "annual_revenue": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "sde": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "ebitda": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "adjusted_assets": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "liabilities": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "net_operating_income": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "cash_flows": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "cash_flow_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fcff",
                  "fcfe"
                ]
              },
              "projection_period_unit": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "year",
                  "quarter",
                  "month"
                ]
              },
              "terminal_value_mode": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "finite_horizon",
                  "gordon_growth"
                ]
              },
              "projected_revenue": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "financial_history": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "period_type": {
                      "type": "string",
                      "enum": [
                        "annual",
                        "ltm",
                        "interim"
                      ]
                    },
                    "annual_revenue": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "reported_sde": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "reported_ebitda": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "normalization_adjustments": {
                      "default": [],
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "target_metric": {
                            "type": "string",
                            "enum": [
                              "sde",
                              "ebitda"
                            ]
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "treatment": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "proposed",
                              "excluded"
                            ]
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "owner_compensation",
                              "related_party",
                              "nonrecurring_expense",
                              "nonoperating_expense",
                              "nonrecurring_income",
                              "discretionary_expense",
                              "rent_normalization",
                              "payroll_normalization",
                              "other"
                            ]
                          },
                          "provenance": {
                            "type": "object",
                            "properties": {
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "source_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "unverified",
                                  "modeled"
                                ]
                              },
                              "observed_at": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "reference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "note": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "source_type",
                              "source_name",
                              "verification"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "adjustment_id",
                          "label",
                          "target_metric",
                          "operation",
                          "amount",
                          "treatment",
                          "category"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "period_end",
                    "period_type"
                  ],
                  "additionalProperties": false
                }
              },
              "capital_structure": {
                "type": "object",
                "properties": {
                  "cash_and_equivalents": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "interest_bearing_debt": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_like_items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "nonoperating_assets": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "working_capital_adjustment": {
                    "type": "object",
                    "properties": {
                      "operation": {
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "required": [
                      "operation",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "replacement_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "current_market_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "inventory_gross_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "completion_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "selling_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "disposal_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "project_property_estimated_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "appraised_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "source_type",
              "source_name",
              "verification"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_type": {
                  "type": "string",
                  "enum": [
                    "owner_input",
                    "advisor_input",
                    "lender_input",
                    "user_scenario",
                    "market_comparable",
                    "appraisal",
                    "public_dataset",
                    "internal_benchmark",
                    "model_policy",
                    "financial_statement",
                    "tax_return",
                    "other"
                  ]
                },
                "source_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "unverified",
                    "modeled"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "reference": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "note": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "source_type",
                "source_name",
                "verification",
                "field"
              ],
              "additionalProperties": false
            }
          },
          "input_quality": {
            "type": "object",
            "properties": {
              "completeness_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "completeness_score",
              "verification",
              "source_type",
              "source_name"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "default": {},
            "type": "object",
            "properties": {
              "sde_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "ebitda_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "revenue_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "capitalization_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "discount_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "terminal_growth_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "royalty_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "tax_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "total_obsolescence_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "recovery_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "market_comparables": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparable_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "adjusted_value": {
                  "type": "number",
                  "minimum": 0
                },
                "value_basis": {
                  "type": "string",
                  "enum": [
                    "enterprise_value",
                    "equity_value",
                    "asset_value"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "transaction_date": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "observed_value": {
                  "type": "number",
                  "minimum": 0
                },
                "denominator": {
                  "type": "object",
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "sde",
                        "ebitda",
                        "revenue",
                        "net_operating_income",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "metric",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^\\d{6}$"
                },
                "geography": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "inclusion_rationale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjusted_value",
                "value_basis"
              ],
              "additionalProperties": false
            }
          },
          "portfolio_treatment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "include"
                  },
                  "ownership_fraction": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "mode",
                  "ownership_fraction"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "embedded"
                  },
                  "in_asset_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "mode",
                  "in_asset_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "exclude"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "business_id"
        ],
        "additionalProperties": false,
        "description": "An existing SMB Business reference. Optional facts supplement this valuation only and never overwrite the Business record."
      },
      "smb_v0_operations_create_valuation_intake_request.__local.properties.body.AssetInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "business",
                  "commercial_real_estate",
                  "brand",
                  "customer_relationships",
                  "intangible",
                  "equipment",
                  "inventory",
                  "other"
                ]
              },
              {
                "type": "string",
                "const": "auto"
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "details": {
            "default": {
              "cash_flow_basis": "unspecified",
              "projection_period_unit": "unspecified",
              "terminal_value_mode": "unspecified"
            },
            "type": "object",
            "properties": {
              "naics_code": {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              "employee_count": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              "owner_operated": {
                "type": "boolean"
              },
              "owner_labor": {
                "type": "object",
                "properties": {
                  "post_transaction_treatment": {
                    "type": "string",
                    "enum": [
                      "buyer_supplied",
                      "hired_replacement",
                      "existing_management",
                      "unspecified"
                    ]
                  },
                  "annual_replacement_compensation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "replacement_compensation_reflected_in_ebitda": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "post_transaction_treatment"
                ],
                "additionalProperties": false
              },
              "asset_intensive": {
                "type": "boolean"
              },
              "stable_earnings": {
                "type": "boolean"
              },
              "business_real_estate_earnings_basis": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "market_rent_reflected",
                  "market_rent_normalized",
                  "unresolved"
                ],
                "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
              },
              "annual_revenue": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "sde": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "ebitda": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "adjusted_assets": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "liabilities": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "net_operating_income": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "cash_flows": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "cash_flow_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fcff",
                  "fcfe"
                ]
              },
              "projection_period_unit": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "year",
                  "quarter",
                  "month"
                ]
              },
              "terminal_value_mode": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "finite_horizon",
                  "gordon_growth"
                ]
              },
              "projected_revenue": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "financial_history": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "period_type": {
                      "type": "string",
                      "enum": [
                        "annual",
                        "ltm",
                        "interim"
                      ]
                    },
                    "annual_revenue": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "reported_sde": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "reported_ebitda": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "normalization_adjustments": {
                      "default": [],
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "target_metric": {
                            "type": "string",
                            "enum": [
                              "sde",
                              "ebitda"
                            ]
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "treatment": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "proposed",
                              "excluded"
                            ]
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "owner_compensation",
                              "related_party",
                              "nonrecurring_expense",
                              "nonoperating_expense",
                              "nonrecurring_income",
                              "discretionary_expense",
                              "rent_normalization",
                              "payroll_normalization",
                              "other"
                            ]
                          },
                          "provenance": {
                            "type": "object",
                            "properties": {
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "source_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "unverified",
                                  "modeled"
                                ]
                              },
                              "observed_at": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "reference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "note": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "source_type",
                              "source_name",
                              "verification"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "adjustment_id",
                          "label",
                          "target_metric",
                          "operation",
                          "amount",
                          "treatment",
                          "category"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "period_end",
                    "period_type"
                  ],
                  "additionalProperties": false
                }
              },
              "capital_structure": {
                "type": "object",
                "properties": {
                  "cash_and_equivalents": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "interest_bearing_debt": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_like_items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "nonoperating_assets": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "working_capital_adjustment": {
                    "type": "object",
                    "properties": {
                      "operation": {
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "required": [
                      "operation",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "replacement_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "current_market_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "inventory_gross_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "completion_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "selling_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "disposal_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "project_property_estimated_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "appraised_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "source_type",
              "source_name",
              "verification"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_type": {
                  "type": "string",
                  "enum": [
                    "owner_input",
                    "advisor_input",
                    "lender_input",
                    "user_scenario",
                    "market_comparable",
                    "appraisal",
                    "public_dataset",
                    "internal_benchmark",
                    "model_policy",
                    "financial_statement",
                    "tax_return",
                    "other"
                  ]
                },
                "source_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "unverified",
                    "modeled"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "reference": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "note": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "source_type",
                "source_name",
                "verification",
                "field"
              ],
              "additionalProperties": false
            }
          },
          "input_quality": {
            "type": "object",
            "properties": {
              "completeness_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "completeness_score",
              "verification",
              "source_type",
              "source_name"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "default": {},
            "type": "object",
            "properties": {
              "sde_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "ebitda_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "revenue_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "capitalization_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "discount_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "terminal_growth_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "royalty_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "tax_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "total_obsolescence_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "recovery_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "market_comparables": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparable_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "adjusted_value": {
                  "type": "number",
                  "minimum": 0
                },
                "value_basis": {
                  "type": "string",
                  "enum": [
                    "enterprise_value",
                    "equity_value",
                    "asset_value"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "transaction_date": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "observed_value": {
                  "type": "number",
                  "minimum": 0
                },
                "denominator": {
                  "type": "object",
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "sde",
                        "ebitda",
                        "revenue",
                        "net_operating_income",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "metric",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^\\d{6}$"
                },
                "geography": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "inclusion_rationale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjusted_value",
                "value_basis"
              ],
              "additionalProperties": false
            }
          },
          "portfolio_treatment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "include"
                  },
                  "ownership_fraction": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "mode",
                  "ownership_fraction"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "embedded"
                  },
                  "in_asset_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "mode",
                  "in_asset_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "exclude"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "smb_v0_operations_get_business_request.__local.OpaqueId": {
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "smb_v0_operations_get_business_request.__local.Timestamp": {
        "format": "date-time",
        "type": "string"
      },
      "smb_v0_operations_get_business_response.__local.Digest": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "smb_v0_operations_get_business_response.__local.Timestamp": {
        "format": "date-time",
        "type": "string"
      },
      "smb_v0_operations_get_workspace_request.__local.Timestamp": {
        "format": "date-time",
        "type": "string"
      },
      "smb_v0_operations_get_workspace_request.__local.Uuid": {
        "format": "uuid",
        "type": "string"
      },
      "smb_v0_operations_get_workspace_response.__local.Digest": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "smb_v0_operations_get_workspace_response.__local.RevisionRef": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.Timestamp"
          },
          "id": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.Uuid"
          },
          "record_id": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.Uuid"
          }
        },
        "required": [
          "created_at",
          "id",
          "record_id"
        ],
        "type": "object"
      },
      "smb_v0_operations_get_workspace_response.__local.SourceRef": {
        "additionalProperties": false,
        "properties": {
          "source_id": {
            "$ref": "#/components/schemas/smb_v0_operations_get_workspace_response.__local.Uuid"
          }
        },
        "required": [
          "source_id"
        ],
        "type": "object"
      },
      "smb_v0_operations_get_workspace_response.__local.Timestamp": {
        "format": "date-time",
        "type": "string"
      },
      "smb_v0_operations_get_workspace_response.__local.Uuid": {
        "format": "uuid",
        "type": "string"
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema0"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema2"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema4"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema8"
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_preview_list_request.__local.properties.body.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema14"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_preview_list_request.__local.properties.body.__schema15"
          }
        ]
      },
      "smb_v0_operations_run_valuation_request.__local.properties.body.BusinessReference": {
        "type": "object",
        "properties": {
          "business_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The public SMB Business ID to resolve using the caller-authorized Public or Workspace view."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "details": {
            "default": {
              "cash_flow_basis": "unspecified",
              "projection_period_unit": "unspecified",
              "terminal_value_mode": "unspecified"
            },
            "type": "object",
            "properties": {
              "naics_code": {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              "employee_count": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              "owner_operated": {
                "type": "boolean"
              },
              "owner_labor": {
                "type": "object",
                "properties": {
                  "post_transaction_treatment": {
                    "type": "string",
                    "enum": [
                      "buyer_supplied",
                      "hired_replacement",
                      "existing_management",
                      "unspecified"
                    ]
                  },
                  "annual_replacement_compensation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "replacement_compensation_reflected_in_ebitda": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "post_transaction_treatment"
                ],
                "additionalProperties": false
              },
              "asset_intensive": {
                "type": "boolean"
              },
              "stable_earnings": {
                "type": "boolean"
              },
              "business_real_estate_earnings_basis": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "market_rent_reflected",
                  "market_rent_normalized",
                  "unresolved"
                ],
                "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
              },
              "annual_revenue": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "sde": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "ebitda": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "adjusted_assets": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "liabilities": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "net_operating_income": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "cash_flows": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "cash_flow_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fcff",
                  "fcfe"
                ]
              },
              "projection_period_unit": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "year",
                  "quarter",
                  "month"
                ]
              },
              "terminal_value_mode": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "finite_horizon",
                  "gordon_growth"
                ]
              },
              "projected_revenue": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "financial_history": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "period_type": {
                      "type": "string",
                      "enum": [
                        "annual",
                        "ltm",
                        "interim"
                      ]
                    },
                    "annual_revenue": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "reported_sde": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "reported_ebitda": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "normalization_adjustments": {
                      "default": [],
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "target_metric": {
                            "type": "string",
                            "enum": [
                              "sde",
                              "ebitda"
                            ]
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "treatment": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "proposed",
                              "excluded"
                            ]
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "owner_compensation",
                              "related_party",
                              "nonrecurring_expense",
                              "nonoperating_expense",
                              "nonrecurring_income",
                              "discretionary_expense",
                              "rent_normalization",
                              "payroll_normalization",
                              "other"
                            ]
                          },
                          "provenance": {
                            "type": "object",
                            "properties": {
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "source_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "unverified",
                                  "modeled"
                                ]
                              },
                              "observed_at": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "reference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "note": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "source_type",
                              "source_name",
                              "verification"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "adjustment_id",
                          "label",
                          "target_metric",
                          "operation",
                          "amount",
                          "treatment",
                          "category"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "period_end",
                    "period_type"
                  ],
                  "additionalProperties": false
                }
              },
              "capital_structure": {
                "type": "object",
                "properties": {
                  "cash_and_equivalents": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "interest_bearing_debt": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_like_items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "nonoperating_assets": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "working_capital_adjustment": {
                    "type": "object",
                    "properties": {
                      "operation": {
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "required": [
                      "operation",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "replacement_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "current_market_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "inventory_gross_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "completion_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "selling_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "disposal_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "project_property_estimated_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "appraised_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "source_type",
              "source_name",
              "verification"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_type": {
                  "type": "string",
                  "enum": [
                    "owner_input",
                    "advisor_input",
                    "lender_input",
                    "user_scenario",
                    "market_comparable",
                    "appraisal",
                    "public_dataset",
                    "internal_benchmark",
                    "model_policy",
                    "financial_statement",
                    "tax_return",
                    "other"
                  ]
                },
                "source_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "unverified",
                    "modeled"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "reference": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "note": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "source_type",
                "source_name",
                "verification",
                "field"
              ],
              "additionalProperties": false
            }
          },
          "input_quality": {
            "type": "object",
            "properties": {
              "completeness_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "completeness_score",
              "verification",
              "source_type",
              "source_name"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "default": {},
            "type": "object",
            "properties": {
              "sde_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "ebitda_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "revenue_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "capitalization_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "discount_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "terminal_growth_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "royalty_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "tax_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "total_obsolescence_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "recovery_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "market_comparables": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparable_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "adjusted_value": {
                  "type": "number",
                  "minimum": 0
                },
                "value_basis": {
                  "type": "string",
                  "enum": [
                    "enterprise_value",
                    "equity_value",
                    "asset_value"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "transaction_date": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "observed_value": {
                  "type": "number",
                  "minimum": 0
                },
                "denominator": {
                  "type": "object",
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "sde",
                        "ebitda",
                        "revenue",
                        "net_operating_income",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "metric",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^\\d{6}$"
                },
                "geography": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "inclusion_rationale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjusted_value",
                "value_basis"
              ],
              "additionalProperties": false
            }
          },
          "portfolio_treatment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "include"
                  },
                  "ownership_fraction": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "mode",
                  "ownership_fraction"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "embedded"
                  },
                  "in_asset_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "mode",
                  "in_asset_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "exclude"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "business_id"
        ],
        "additionalProperties": false,
        "description": "An existing SMB Business reference. Optional facts supplement this valuation only and never overwrite the Business record."
      },
      "smb_v0_operations_run_valuation_request.__local.properties.body.AssetInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "business",
                  "commercial_real_estate",
                  "brand",
                  "customer_relationships",
                  "intangible",
                  "equipment",
                  "inventory",
                  "other"
                ]
              },
              {
                "type": "string",
                "const": "auto"
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "details": {
            "default": {
              "cash_flow_basis": "unspecified",
              "projection_period_unit": "unspecified",
              "terminal_value_mode": "unspecified"
            },
            "type": "object",
            "properties": {
              "naics_code": {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              "employee_count": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              "owner_operated": {
                "type": "boolean"
              },
              "owner_labor": {
                "type": "object",
                "properties": {
                  "post_transaction_treatment": {
                    "type": "string",
                    "enum": [
                      "buyer_supplied",
                      "hired_replacement",
                      "existing_management",
                      "unspecified"
                    ]
                  },
                  "annual_replacement_compensation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "replacement_compensation_reflected_in_ebitda": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "post_transaction_treatment"
                ],
                "additionalProperties": false
              },
              "asset_intensive": {
                "type": "boolean"
              },
              "stable_earnings": {
                "type": "boolean"
              },
              "business_real_estate_earnings_basis": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "market_rent_reflected",
                  "market_rent_normalized",
                  "unresolved"
                ],
                "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
              },
              "annual_revenue": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "sde": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "ebitda": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "adjusted_assets": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "liabilities": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "net_operating_income": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "cash_flows": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "cash_flow_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fcff",
                  "fcfe"
                ]
              },
              "projection_period_unit": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "year",
                  "quarter",
                  "month"
                ]
              },
              "terminal_value_mode": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "finite_horizon",
                  "gordon_growth"
                ]
              },
              "projected_revenue": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "financial_history": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "period_type": {
                      "type": "string",
                      "enum": [
                        "annual",
                        "ltm",
                        "interim"
                      ]
                    },
                    "annual_revenue": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "reported_sde": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "reported_ebitda": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "normalization_adjustments": {
                      "default": [],
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "target_metric": {
                            "type": "string",
                            "enum": [
                              "sde",
                              "ebitda"
                            ]
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "treatment": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "proposed",
                              "excluded"
                            ]
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "owner_compensation",
                              "related_party",
                              "nonrecurring_expense",
                              "nonoperating_expense",
                              "nonrecurring_income",
                              "discretionary_expense",
                              "rent_normalization",
                              "payroll_normalization",
                              "other"
                            ]
                          },
                          "provenance": {
                            "type": "object",
                            "properties": {
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "source_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "unverified",
                                  "modeled"
                                ]
                              },
                              "observed_at": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "reference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "note": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "source_type",
                              "source_name",
                              "verification"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "adjustment_id",
                          "label",
                          "target_metric",
                          "operation",
                          "amount",
                          "treatment",
                          "category"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "period_end",
                    "period_type"
                  ],
                  "additionalProperties": false
                }
              },
              "capital_structure": {
                "type": "object",
                "properties": {
                  "cash_and_equivalents": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "interest_bearing_debt": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_like_items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "nonoperating_assets": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "working_capital_adjustment": {
                    "type": "object",
                    "properties": {
                      "operation": {
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "required": [
                      "operation",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "replacement_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "current_market_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "inventory_gross_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "completion_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "selling_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "disposal_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "project_property_estimated_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "appraised_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "source_type",
              "source_name",
              "verification"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_type": {
                  "type": "string",
                  "enum": [
                    "owner_input",
                    "advisor_input",
                    "lender_input",
                    "user_scenario",
                    "market_comparable",
                    "appraisal",
                    "public_dataset",
                    "internal_benchmark",
                    "model_policy",
                    "financial_statement",
                    "tax_return",
                    "other"
                  ]
                },
                "source_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "unverified",
                    "modeled"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "reference": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "note": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "source_type",
                "source_name",
                "verification",
                "field"
              ],
              "additionalProperties": false
            }
          },
          "input_quality": {
            "type": "object",
            "properties": {
              "completeness_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "completeness_score",
              "verification",
              "source_type",
              "source_name"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "default": {},
            "type": "object",
            "properties": {
              "sde_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "ebitda_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "revenue_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "capitalization_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "discount_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "terminal_growth_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "royalty_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "tax_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "total_obsolescence_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "recovery_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "market_comparables": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparable_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "adjusted_value": {
                  "type": "number",
                  "minimum": 0
                },
                "value_basis": {
                  "type": "string",
                  "enum": [
                    "enterprise_value",
                    "equity_value",
                    "asset_value"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "transaction_date": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "observed_value": {
                  "type": "number",
                  "minimum": 0
                },
                "denominator": {
                  "type": "object",
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "sde",
                        "ebitda",
                        "revenue",
                        "net_operating_income",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "metric",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^\\d{6}$"
                },
                "geography": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "inclusion_rationale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjusted_value",
                "value_basis"
              ],
              "additionalProperties": false
            }
          },
          "portfolio_treatment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "include"
                  },
                  "ownership_fraction": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "mode",
                  "ownership_fraction"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "embedded"
                  },
                  "in_asset_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "mode",
                  "in_asset_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "exclude"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "smb_v0_operations_run_valuation_request/properties/body.__local.BusinessReference": {
        "type": "object",
        "properties": {
          "business_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The public SMB Business ID to resolve using the caller-authorized Public or Workspace view."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "details": {
            "default": {
              "cash_flow_basis": "unspecified",
              "projection_period_unit": "unspecified",
              "terminal_value_mode": "unspecified"
            },
            "type": "object",
            "properties": {
              "naics_code": {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              "employee_count": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              "owner_operated": {
                "type": "boolean"
              },
              "owner_labor": {
                "type": "object",
                "properties": {
                  "post_transaction_treatment": {
                    "type": "string",
                    "enum": [
                      "buyer_supplied",
                      "hired_replacement",
                      "existing_management",
                      "unspecified"
                    ]
                  },
                  "annual_replacement_compensation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "replacement_compensation_reflected_in_ebitda": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "post_transaction_treatment"
                ],
                "additionalProperties": false
              },
              "asset_intensive": {
                "type": "boolean"
              },
              "stable_earnings": {
                "type": "boolean"
              },
              "business_real_estate_earnings_basis": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "market_rent_reflected",
                  "market_rent_normalized",
                  "unresolved"
                ],
                "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
              },
              "annual_revenue": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "sde": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "ebitda": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "adjusted_assets": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "liabilities": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "net_operating_income": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "cash_flows": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "cash_flow_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fcff",
                  "fcfe"
                ]
              },
              "projection_period_unit": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "year",
                  "quarter",
                  "month"
                ]
              },
              "terminal_value_mode": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "finite_horizon",
                  "gordon_growth"
                ]
              },
              "projected_revenue": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "financial_history": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "period_type": {
                      "type": "string",
                      "enum": [
                        "annual",
                        "ltm",
                        "interim"
                      ]
                    },
                    "annual_revenue": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "reported_sde": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "reported_ebitda": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "normalization_adjustments": {
                      "default": [],
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "target_metric": {
                            "type": "string",
                            "enum": [
                              "sde",
                              "ebitda"
                            ]
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "treatment": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "proposed",
                              "excluded"
                            ]
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "owner_compensation",
                              "related_party",
                              "nonrecurring_expense",
                              "nonoperating_expense",
                              "nonrecurring_income",
                              "discretionary_expense",
                              "rent_normalization",
                              "payroll_normalization",
                              "other"
                            ]
                          },
                          "provenance": {
                            "type": "object",
                            "properties": {
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "source_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "unverified",
                                  "modeled"
                                ]
                              },
                              "observed_at": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "reference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "note": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "source_type",
                              "source_name",
                              "verification"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "adjustment_id",
                          "label",
                          "target_metric",
                          "operation",
                          "amount",
                          "treatment",
                          "category"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "period_end",
                    "period_type"
                  ],
                  "additionalProperties": false
                }
              },
              "capital_structure": {
                "type": "object",
                "properties": {
                  "cash_and_equivalents": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "interest_bearing_debt": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_like_items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "nonoperating_assets": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "working_capital_adjustment": {
                    "type": "object",
                    "properties": {
                      "operation": {
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "required": [
                      "operation",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "replacement_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "current_market_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "inventory_gross_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "completion_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "selling_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "disposal_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "project_property_estimated_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "appraised_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "source_type",
              "source_name",
              "verification"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_type": {
                  "type": "string",
                  "enum": [
                    "owner_input",
                    "advisor_input",
                    "lender_input",
                    "user_scenario",
                    "market_comparable",
                    "appraisal",
                    "public_dataset",
                    "internal_benchmark",
                    "model_policy",
                    "financial_statement",
                    "tax_return",
                    "other"
                  ]
                },
                "source_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "unverified",
                    "modeled"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "reference": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "note": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "source_type",
                "source_name",
                "verification",
                "field"
              ],
              "additionalProperties": false
            }
          },
          "input_quality": {
            "type": "object",
            "properties": {
              "completeness_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "completeness_score",
              "verification",
              "source_type",
              "source_name"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "default": {},
            "type": "object",
            "properties": {
              "sde_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "ebitda_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "revenue_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "capitalization_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "discount_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "terminal_growth_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "royalty_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "tax_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "total_obsolescence_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "recovery_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "market_comparables": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparable_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "adjusted_value": {
                  "type": "number",
                  "minimum": 0
                },
                "value_basis": {
                  "type": "string",
                  "enum": [
                    "enterprise_value",
                    "equity_value",
                    "asset_value"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "transaction_date": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "observed_value": {
                  "type": "number",
                  "minimum": 0
                },
                "denominator": {
                  "type": "object",
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "sde",
                        "ebitda",
                        "revenue",
                        "net_operating_income",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "metric",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^\\d{6}$"
                },
                "geography": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "inclusion_rationale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjusted_value",
                "value_basis"
              ],
              "additionalProperties": false
            }
          },
          "portfolio_treatment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "include"
                  },
                  "ownership_fraction": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "mode",
                  "ownership_fraction"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "embedded"
                  },
                  "in_asset_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "mode",
                  "in_asset_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "exclude"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "business_id"
        ],
        "additionalProperties": false,
        "description": "An existing SMB Business reference. Optional facts supplement this valuation only and never overwrite the Business record."
      },
      "smb_v0_operations_run_valuation_request/properties/body.__local.AssetInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "business",
                  "commercial_real_estate",
                  "brand",
                  "customer_relationships",
                  "intangible",
                  "equipment",
                  "inventory",
                  "other"
                ]
              },
              {
                "type": "string",
                "const": "auto"
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "details": {
            "default": {
              "cash_flow_basis": "unspecified",
              "projection_period_unit": "unspecified",
              "terminal_value_mode": "unspecified"
            },
            "type": "object",
            "properties": {
              "naics_code": {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              "employee_count": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              "owner_operated": {
                "type": "boolean"
              },
              "owner_labor": {
                "type": "object",
                "properties": {
                  "post_transaction_treatment": {
                    "type": "string",
                    "enum": [
                      "buyer_supplied",
                      "hired_replacement",
                      "existing_management",
                      "unspecified"
                    ]
                  },
                  "annual_replacement_compensation": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "replacement_compensation_reflected_in_ebitda": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "post_transaction_treatment"
                ],
                "additionalProperties": false
              },
              "asset_intensive": {
                "type": "boolean"
              },
              "stable_earnings": {
                "type": "boolean"
              },
              "business_real_estate_earnings_basis": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "market_rent_reflected",
                  "market_rent_normalized",
                  "unresolved"
                ],
                "description": "Use not_applicable when this business is unrelated to any CRE item in the portfolio. Otherwise state whether operating earnings already reflect market rent, were normalized to market rent, or remain unresolved."
              },
              "annual_revenue": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "sde": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "ebitda": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "adjusted_assets": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "liabilities": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "net_operating_income": {
                "type": "number",
                "minimum": -90071992547409.9,
                "maximum": 90071992547409.9
              },
              "cash_flows": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "cash_flow_basis": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "fcff",
                  "fcfe"
                ]
              },
              "projection_period_unit": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "year",
                  "quarter",
                  "month"
                ]
              },
              "terminal_value_mode": {
                "default": "unspecified",
                "type": "string",
                "enum": [
                  "unspecified",
                  "finite_horizon",
                  "gordon_growth"
                ]
              },
              "projected_revenue": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  },
                  "required": [
                    "period",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "financial_history": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "period_type": {
                      "type": "string",
                      "enum": [
                        "annual",
                        "ltm",
                        "interim"
                      ]
                    },
                    "annual_revenue": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "reported_sde": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "reported_ebitda": {
                      "type": "number",
                      "minimum": -90071992547409.9,
                      "maximum": 90071992547409.9
                    },
                    "normalization_adjustments": {
                      "default": [],
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "target_metric": {
                            "type": "string",
                            "enum": [
                              "sde",
                              "ebitda"
                            ]
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "amount": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 90071992547409.9
                          },
                          "treatment": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "proposed",
                              "excluded"
                            ]
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "owner_compensation",
                              "related_party",
                              "nonrecurring_expense",
                              "nonoperating_expense",
                              "nonrecurring_income",
                              "discretionary_expense",
                              "rent_normalization",
                              "payroll_normalization",
                              "other"
                            ]
                          },
                          "provenance": {
                            "type": "object",
                            "properties": {
                              "source_type": {
                                "type": "string",
                                "enum": [
                                  "owner_input",
                                  "advisor_input",
                                  "lender_input",
                                  "user_scenario",
                                  "market_comparable",
                                  "appraisal",
                                  "public_dataset",
                                  "internal_benchmark",
                                  "model_policy",
                                  "financial_statement",
                                  "tax_return",
                                  "other"
                                ]
                              },
                              "source_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "verification": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "unverified",
                                  "modeled"
                                ]
                              },
                              "observed_at": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "reference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "note": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "source_type",
                              "source_name",
                              "verification"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "adjustment_id",
                          "label",
                          "target_metric",
                          "operation",
                          "amount",
                          "treatment",
                          "category"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "period_end",
                    "period_type"
                  ],
                  "additionalProperties": false
                }
              },
              "capital_structure": {
                "type": "object",
                "properties": {
                  "cash_and_equivalents": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "interest_bearing_debt": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "debt_like_items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "nonoperating_assets": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 90071992547409.9
                  },
                  "working_capital_adjustment": {
                    "type": "object",
                    "properties": {
                      "operation": {
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 90071992547409.9
                      }
                    },
                    "required": [
                      "operation",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "replacement_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "current_market_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "inventory_gross_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "completion_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "selling_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "disposal_costs": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "project_property_estimated_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              },
              "appraised_value": {
                "type": "number",
                "minimum": 0,
                "maximum": 90071992547409.9
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "source_type",
              "source_name",
              "verification"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_type": {
                  "type": "string",
                  "enum": [
                    "owner_input",
                    "advisor_input",
                    "lender_input",
                    "user_scenario",
                    "market_comparable",
                    "appraisal",
                    "public_dataset",
                    "internal_benchmark",
                    "model_policy",
                    "financial_statement",
                    "tax_return",
                    "other"
                  ]
                },
                "source_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "unverified",
                    "modeled"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "reference": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "note": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "source_type",
                "source_name",
                "verification",
                "field"
              ],
              "additionalProperties": false
            }
          },
          "input_quality": {
            "type": "object",
            "properties": {
              "completeness_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verification": {
                "type": "string",
                "enum": [
                  "verified",
                  "unverified",
                  "modeled"
                ]
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "owner_input",
                  "advisor_input",
                  "lender_input",
                  "user_scenario",
                  "market_comparable",
                  "appraisal",
                  "public_dataset",
                  "internal_benchmark",
                  "model_policy",
                  "financial_statement",
                  "tax_return",
                  "other"
                ]
              },
              "source_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "completeness_score",
              "verification",
              "source_type",
              "source_name"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "default": {},
            "type": "object",
            "properties": {
              "sde_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "ebitda_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "revenue_multiple": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "capitalization_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "discount_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "terminal_growth_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "royalty_rate": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1
              },
              "tax_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "total_obsolescence_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "recovery_rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "market_comparables": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparable_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "adjusted_value": {
                  "type": "number",
                  "minimum": 0
                },
                "value_basis": {
                  "type": "string",
                  "enum": [
                    "enterprise_value",
                    "equity_value",
                    "asset_value"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "transaction_date": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "observed_value": {
                  "type": "number",
                  "minimum": 0
                },
                "denominator": {
                  "type": "object",
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "sde",
                        "ebitda",
                        "revenue",
                        "net_operating_income",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "metric",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "naics_code": {
                  "type": "string",
                  "pattern": "^\\d{6}$"
                },
                "geography": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "inclusion_rationale": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "source_type": {
                      "type": "string",
                      "enum": [
                        "owner_input",
                        "advisor_input",
                        "lender_input",
                        "user_scenario",
                        "market_comparable",
                        "appraisal",
                        "public_dataset",
                        "internal_benchmark",
                        "model_policy",
                        "financial_statement",
                        "tax_return",
                        "other"
                      ]
                    },
                    "source_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "verified",
                        "unverified",
                        "modeled"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "source_type",
                    "source_name",
                    "verification"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "adjusted_value",
                "value_basis"
              ],
              "additionalProperties": false
            }
          },
          "portfolio_treatment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "include"
                  },
                  "ownership_fraction": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "mode",
                  "ownership_fraction"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "embedded"
                  },
                  "in_asset_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "mode",
                  "in_asset_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "exclude"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "smb_v0_operations_search_businesses_response.__local.Cursor": {
        "maxLength": 2048,
        "minLength": 1,
        "type": "string"
      },
      "smb_v0_operations_search_businesses_response.__local.Digest": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "smb_v0_operations_search_businesses_response.__local.OpaqueId": {
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "smb_v0_operations_search_businesses_response.__local.Page": {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "$ref": "#/components/schemas/smb_v0_operations_search_businesses_response.__local.Cursor"
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "has_more"
        ],
        "type": "object"
      },
      "smb_v0_operations_search_businesses_response.__local.Timestamp": {
        "format": "date-time",
        "type": "string"
      },
      "smb_v0_operations_search_workspace_businesses_response.__local.Cursor": {
        "maxLength": 2048,
        "minLength": 1,
        "type": "string"
      },
      "smb_v0_operations_search_workspace_businesses_response.__local.Digest": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "smb_v0_operations_search_workspace_businesses_response.__local.Page": {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "$ref": "#/components/schemas/smb_v0_operations_search_workspace_businesses_response.__local.Cursor"
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "has_more"
        ],
        "type": "object"
      },
      "smb_v0_operations_search_workspace_businesses_response.__local.Timestamp": {
        "format": "date-time",
        "type": "string"
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema0": {
        "type": "string",
        "minLength": 1,
        "maxLength": 120
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema1": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 1000
          },
          {
            "type": "null"
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema2": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "string",
                "const": "smb.list.v1"
              },
              "subject_type": {
                "type": "string",
                "const": "business"
              },
              "rule": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema3"
                      },
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema5"
                      },
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema6"
                      },
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema7"
                      },
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema9"
                      },
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema11"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "group"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "all",
                              "any"
                            ]
                          },
                          "rules": {
                            "minItems": 1,
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema13"
                            }
                          }
                        },
                        "required": [
                          "kind",
                          "operator",
                          "rules"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "not"
                          },
                          "rule": {
                            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema13"
                          }
                        },
                        "required": [
                          "kind",
                          "rule"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "subject_type",
              "rule"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "string",
                "const": "smb.list.v1"
              },
              "subject_type": {
                "type": "string",
                "const": "person"
              },
              "rule": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema17"
                      },
                      {
                        "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema18"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "group"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "all",
                              "any"
                            ]
                          },
                          "rules": {
                            "minItems": 1,
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema19"
                            }
                          }
                        },
                        "required": [
                          "kind",
                          "operator",
                          "rules"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "not"
                          },
                          "rule": {
                            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema19"
                          }
                        },
                        "required": [
                          "kind",
                          "rule"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "subject_type",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema4": {
        "type": "string",
        "maxLength": 500
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema5": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema7": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema8"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema8"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema8": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema9": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema10"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema10"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema10": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema11": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema12"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema12": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema5"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema7"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema9"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema11"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema14"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema14"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema14": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema5"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema7"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema9"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema11"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema15"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema15"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema15": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema5"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema7"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema9"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema11"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema16"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema16"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema3"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema5"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema6"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema7"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema9"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema11"
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema17": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema4"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema18": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema17"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema18"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema20"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema20"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema20": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema17"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema18"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema21"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema21"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema21": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema17"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema18"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema22"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema22"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema22": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema17"
          },
          {
            "$ref": "#/components/schemas/smb_v0_operations_update_list_request.__local.properties.body.__schema18"
          }
        ]
      },
      "smb_v0_operations_update_list_request.__local.properties.body.__schema23": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.200.content.application/json.schema.properties.data.__schema20": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema8"
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.post.responses.201.content.application~1json.schema.properties.data.__schema15"
          }
        ]
      },
      "path:/v1/lists.__local.post.responses.201.content.application/json.schema.properties.data.__schema20": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
              },
              "workspace_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)$"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "definition": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "string",
                        "const": "smb.list.v1"
                      },
                      "subject_type": {
                        "type": "string",
                        "const": "business"
                      },
                      "rule": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
                              },
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
                              },
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
                              },
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
                              },
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
                              },
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "group"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "all",
                                      "any"
                                    ]
                                  },
                                  "rules": {
                                    "minItems": 1,
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema12"
                                    }
                                  }
                                },
                                "required": [
                                  "kind",
                                  "operator",
                                  "rules"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "not"
                                  },
                                  "rule": {
                                    "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema12"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "rule"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "subject_type",
                      "rule"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "string",
                        "const": "smb.list.v1"
                      },
                      "subject_type": {
                        "type": "string",
                        "const": "person"
                      },
                      "rule": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
                              },
                              {
                                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "group"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "all",
                                      "any"
                                    ]
                                  },
                                  "rules": {
                                    "minItems": 1,
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema18"
                                    }
                                  }
                                },
                                "required": [
                                  "kind",
                                  "operator",
                                  "rules"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "not"
                                  },
                                  "rule": {
                                    "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema18"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "rule"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "subject_type",
                      "rule"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycle_status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "count": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "const": "unknown"
                      },
                      "value": {
                        "type": "null"
                      },
                      "as_of": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "status",
                      "value",
                      "as_of"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "exact",
                          "estimated"
                        ]
                      },
                      "value": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "as_of": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "status",
                      "value",
                      "as_of"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "columns": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema22"
                }
              }
            },
            "required": [
              "id",
              "workspace_id",
              "name",
              "description",
              "definition",
              "version",
              "lifecycle_status",
              "count",
              "columns"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
              },
              "workspace_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)$"
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycle_status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "subject_type": {
                "type": "string",
                "enum": [
                  "business",
                  "person"
                ]
              },
              "definition_status": {
                "type": "string",
                "const": "restricted"
              }
            },
            "required": [
              "id",
              "workspace_id",
              "version",
              "lifecycle_status",
              "subject_type",
              "definition_status"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema3": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema5": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema11": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema14"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema14"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema15": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema17": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema20"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema20"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema20": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema21"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema21"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema21": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists.__local.get.responses.200.content.application~1json.schema.properties.data.__schema17"
          }
        ]
      },
      "path:/v1/lists.__local.get.responses.200.content.application/json.schema.properties.data.__schema22": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema0": {
        "type": "string",
        "pattern": "^list_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema1": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema2": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema5": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema6"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema6": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema7": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema8"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema8": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema9": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema10"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema10": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema14"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema14"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema1"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema5"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema7"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema9"
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema15": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema2"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema16": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema20"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema20"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema20": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.get.responses.200.content.application~1json.schema.properties.data.__schema16"
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.get.responses.200.content.application/json.schema.properties.data.__schema21": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema8"
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}.__local.patch.responses.200.content.application~1json.schema.properties.data.__schema15"
          }
        ]
      },
      "path:/v1/lists/{list_id}.__local.patch.responses.200.content.application/json.schema.properties.data.__schema20": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1archive.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          }
        ]
      },
      "path:/v1/lists/{list_id}/archive.__local.post.responses.200.content.application/json.schema.properties.data.__schema20": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}/members.__local.get.responses.200.content.application/json.schema.properties.data.__schema0": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              {
                "type": "string",
                "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            ]
          },
          "subject_type": {
            "type": "string",
            "enum": [
              "business",
              "person"
            ]
          },
          "projection": {
            "type": "string",
            "enum": [
              "public",
              "workspace"
            ]
          },
          "summary": {
            "type": "object",
            "properties": {
              "display_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "display_name"
            ],
            "additionalProperties": false
          },
          "reason": {
            "type": "string",
            "enum": [
              "rule",
              "included"
            ]
          },
          "values": {
            "type": "object",
            "propertyNames": {
              "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)$"
            },
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "text"
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "number"
                    },
                    "value": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "boolean"
                    },
                    "value": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "date"
                    },
                    "value": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "business": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "maxLength": 100
              },
              "website_url": {
                "type": "string",
                "maxLength": 2048
              },
              "city": {
                "type": "string",
                "maxLength": 200
              },
              "state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "naics_code": {
                "type": "string",
                "pattern": "^[0-9]{6}$"
              },
              "naics_title": {
                "type": "string",
                "maxLength": 500
              },
              "icon_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "subject_type",
          "projection",
          "summary",
          "reason",
          "values"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1{list_id}~1restore.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          }
        ]
      },
      "path:/v1/lists/{list_id}/restore.__local.post.responses.200.content.application/json.schema.properties.data.__schema20": {
        "type": "object",
        "properties": {
          "column_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)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "column_id",
          "name",
          "value_type",
          "position"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema0": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema1": {
        "type": "string",
        "maxLength": 500
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "status"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema3": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "website_url"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema4": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "city"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema5"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema5": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "[^ ]"
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema6": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "state"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema7"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema7": {
        "type": "string",
        "pattern": "^(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Dd][Cc])$"
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema8": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "naics_code"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema9"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema9": {
        "type": "string",
        "pattern": "^([0-9]{2,6}|31-33|44-45|48-49)$"
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema10": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema11"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema11": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema12"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema12": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema13"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema13": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema0"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema2"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema3"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema4"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema6"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema8"
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema14": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "eq",
                  "ne",
                  "contains"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "field"
              },
              "field": {
                "type": "string",
                "const": "display_name"
              },
              "operator": {
                "type": "string",
                "const": "in"
              },
              "value": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema1"
                }
              }
            },
            "required": [
              "kind",
              "field",
              "operator",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema15": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "relationship"
          },
          "relationship": {
            "type": "string",
            "const": "works_at"
          },
          "target_id": {
            "type": "string",
            "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
          }
        },
        "required": [
          "kind",
          "relationship",
          "target_id"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema16": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema17"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema17": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema18"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema18": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "group"
              },
              "operator": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "rules": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
                }
              }
            },
            "required": [
              "kind",
              "operator",
              "rules"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "not"
              },
              "rule": {
                "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema19"
              }
            },
            "required": [
              "kind",
              "rule"
            ],
            "additionalProperties": false
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema19": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema14"
          },
          {
            "$ref": "#/components/schemas/path:~1v1~1lists~1draft.__local.post.responses.200.content.application~1json.schema.properties.data.__schema15"
          }
        ]
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema20": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "maxLength": 200
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "path",
          "text"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/draft.__local.post.responses.200.content.application/json.schema.properties.data.__schema21": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              {
                "type": "string",
                "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            ]
          },
          "subject_type": {
            "type": "string",
            "enum": [
              "business",
              "person"
            ]
          },
          "projection": {
            "type": "string",
            "enum": [
              "public",
              "workspace"
            ]
          },
          "summary": {
            "type": "object",
            "properties": {
              "display_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "display_name"
            ],
            "additionalProperties": false
          },
          "reason": {
            "type": "string",
            "enum": [
              "rule",
              "included"
            ]
          },
          "values": {
            "type": "object",
            "propertyNames": {
              "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)$"
            },
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "text"
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "number"
                    },
                    "value": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "boolean"
                    },
                    "value": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "date"
                    },
                    "value": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "business": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "maxLength": 100
              },
              "website_url": {
                "type": "string",
                "maxLength": 2048
              },
              "city": {
                "type": "string",
                "maxLength": 200
              },
              "state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "naics_code": {
                "type": "string",
                "pattern": "^[0-9]{6}$"
              },
              "naics_title": {
                "type": "string",
                "maxLength": 500
              },
              "icon_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "subject_type",
          "projection",
          "summary",
          "reason",
          "values"
        ],
        "additionalProperties": false
      },
      "path:/v1/lists/preview.__local.post.responses.200.content.application/json.schema.properties.data.__schema0": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              },
              {
                "type": "string",
                "pattern": "^person_[0-7][0-9A-HJKMNP-TV-Z]{25}$"
              }
            ]
          },
          "subject_type": {
            "type": "string",
            "enum": [
              "business",
              "person"
            ]
          },
          "projection": {
            "type": "string",
            "enum": [
              "public",
              "workspace"
            ]
          },
          "summary": {
            "type": "object",
            "properties": {
              "display_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "display_name"
            ],
            "additionalProperties": false
          },
          "reason": {
            "type": "string",
            "enum": [
              "rule",
              "included"
            ]
          },
          "values": {
            "type": "object",
            "propertyNames": {
              "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)$"
            },
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "text"
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "number"
                    },
                    "value": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "boolean"
                    },
                    "value": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "value_type": {
                      "type": "string",
                      "const": "date"
                    },
                    "value": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "required": [
                    "value_type",
                    "value"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "business": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "maxLength": 100
              },
              "website_url": {
                "type": "string",
                "maxLength": 2048
              },
              "city": {
                "type": "string",
                "maxLength": 200
              },
              "state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "naics_code": {
                "type": "string",
                "pattern": "^[0-9]{6}$"
              },
              "naics_title": {
                "type": "string",
                "maxLength": 500
              },
              "icon_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "subject_type",
          "projection",
          "summary",
          "reason",
          "values"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "userBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A signed-in, non-anonymous SMB user's access token. Workspace API keys cannot bootstrap a new Workspace."
      },
      "supabaseBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Signed-in user's Supabase access token. Workspace-scoped operations also require SMB-Workspace-Id."
      },
      "workspaceApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-SMB-API-Key"
      }
    }
  },
  "x-smb-source-bundle-sha256": "aee77ac676bd35190c40fd71bcb85a2fb56f6621e6bef9d93608a6f1300d0315",
  "x-smb-amended-source-fingerprint": "c7b49a8121183d6047059e5dda93c94372be6450ed79fd9ac090abca79930513",
  "x-smb-compiled-contract-sha256": "37aa3853fcc6f745de1ec3991fd69e2c6add18b80f8a3aba99ec30f2db07bb43",
  "x-smb-public-projection": true
}
